How to get specification attributes in product model for category product NOP4.2

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
4 anni tempo fa
I was customizing the _ProductBox for display of products in the category pages (or manufacturer pages), but noticed that the SpecificationAttributes was empty.
I need to get some of those specs to display extra info.

Is there an Admin setting for these specs to be loaded? (I understand it will be slower)

Also, Is there a way to get the product variant's parent details as well (or variant siblings details)? (a grouped product)

Thanks!
4 anni tempo fa
Unfortunately there is no admin settings for that. You have to edit in source code in PrepareCategoryModel method of CatalogModelFactory class.

model.Products = _productModelFactory.PrepareProductOverviewModels(products, 
prepareSpecificationAttributes: true).ToList();
4 anni tempo fa
This worked great. Thanks.

Now I just need to get the variant detail.

The issue is that the Price "From $x.xx" format confuses customers (at least in my case)

Basically, I have a GroupedProduct which has 2 variants, 1 variant is a Sample, the other is the  actual product.  None of the info (variants, variant prices, etc) is carried in the product model, unfortunately.
4 anni tempo fa
I put this in the PrepareManufacturerModel method as well (also in the CatalogModelFactory) so it works when a visitor clicks on any of the manufacturer links
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.