Display only atributes combinations with stock

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 лет назад
Hi, I've been searching a few days about this issue, and it seems impossible to find a way to fix this.

The clients shouldn't be able of choosing "forbidden" combinations, in wich case, I could use stock to control the forbidden ones,but does not seems a really efficient way.

I have read some threads, some of themhave solutions... for older versions of nop, like this one https://www.nopcommerce.com/boards/t/28267/how-to-show-out-of-stock-in-dropdown-product-attribute-value-combinations-32.aspx but the table ProductVariantAttributeValue does not exist in my 3.80 database.

Any suggestion? Thanks for your attention
7 лет назад
You are right.

I would advice you to create your own "Library Plugin" or Extension method which I have done. This can find combination based on ProductId and AttributtesXML.

so I simply retrieve all combinations by product id, then parse the XML for values (there's helpers for that)

Once you have the combination. Then you should be able to do what ever you like. If you don't want to touch core - I would advice that you do it as extension method on the ProductDetailsModel.ProductAttributeValueModel model.

Once you have done that you can display whatever you want in the view...
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.