Hello,
I am trying to display the product specification attributes for the simple products (associated products) on the grouped template (v 3.6). I know it is very simple to adjust the source in ProductController.cs to load the specifications all the time, but I do not want to edit the nop source and am opting to do it in the view. I am new to nop and razor (from a forms background) so I am struggling on tis. I have used several forum posts to expose the specificationAttributeService on the page. I am able to load the attributes with this:
var ProductSpecifications = specificationAttributeService.GetProductSpecificationAttributes(variant.Id);
And I can display the attribute names for each simple product with this:
@foreach (var spec in ProductSpecifications)
{
@spec.SpecificationAttributeOption.SpecificationAttribute.Name
<br />
}
What is eluding me is how to get the value of the attribute for the product. I cannot seem to figure out where it is. note that some of the attributes are custom values.
Thank you in advance for any help on this.
David