Nop 2.2 How to do to add Specification Atribute on New Product

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
12 years ago
I want to add more information on the new product and especially the specification attribute information.

See this screenshot to see exactly where I want to add the specification attribute.

http://wsitemc.hd.free.fr/Content/Images/uploaded/AddSpecAtt.jpg


I have edit the file "_ProductBox.cshtml" and add <div class="custom-specification-attribute">

    <div class="description">
        @Html.Raw(Model.ShortDescription)
    </div>
    <div class="custom-specification-attribute">
        @Html.Raw(Model.SpecificationAttributeModels.  )
    </div>

  

How to get the specification attribute from this code?
11 years ago
Does anyone know the answer to this?

I'm trying to do something similar and I'm not sure where to start. In my case I'd like to show the product attributes on the catalog products list pages, on my _ProductBox.cshtml I've got this @Html.Raw(Model.SpecificationAttributeModels.Count().ToString())

but it returns 0 items...

Any help would be greatly appreciated!
11 years ago
Anyone ever get a solution to this?  It appears this returns a zero count even when specification attributes are clearly tied to the product.
11 years ago
I was able to get a count to appear by doing the following:

In CatalogController.cs, underneath:


//product variants
            foreach (var variant in _productService.GetProductVariantsByProductId(product.Id))
                model.ProductVariantModels.Add(PrepareProductVariantModel(new ProductDetailsModel.ProductVariantModel(), variant));


Add the following line:


model.SpecificationAttributeModels = PrepareProductSpecificationModel(product);


Hope that helps someone.   It helped me!  :)
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.