I have added a Generic Attribute to some products, but I am struggling to access the Generic attribute in a view.
I have no problem accessing Generic Attributes in controllers, but I don't want modify the core, i want to create a custom view and access the Generic Attributes form the view.
Is this possible?, and if so some sample code would be great.
var genericAttributeService = EngineContext.Current.Resolve<IGenericAttributeService>();
var attributes = genericAttributeService.GetAttributesForEntity(Model.ProductId, "Product");
This gives you a list of attributes related to that product. You need to further locate the actual attribute you want to get. :)