Close

Help; How can I show a generic attribute value in a custom tab

azharmahmood
10 years ago
#3970 Quote
Avatar
  • 2
I need to show a product variant generic attribute value in a custom Tab, I have managed to show the TAB by modifying _ProductTabs.cshtml view on the plugin, but I am unable to reference the generic attribute.

Nutshell I am having difficulty referencing values from the following model.

ProductDetailsModel.ProductVariantModel

Please help its critical to what I am doing.
Boyko
10 years ago
#3974 Quote
Avatar
  • 1570
azharmahmood wrote:
I need to show a product variant generic attribute value in a custom Tab, I have managed to show the TAB by modifying _ProductTabs.cshtml view on the plugin, but I am unable to reference the generic attribute.

Nutshell I am having difficulty referencing values from the following model.

ProductDetailsModel.ProductVariantModel

Please help its critical to what I am doing.


Hi azharmahmood,

Which version of nopCommerce do you use?
You can resolve (EngineContext.Current.Resolve) the product service in the view to get the product variants and then resolve the generic attribute service to get generic attribute. You will need to add @using Nop.Core.Infrastructure in the view.

Thanks
Regards,
Nop-Templates.com Team