Close

4.10 - Error in product ribbons when using product attributes

troels_ejsing
3 months ago
#21624 Quote
Avatar
  • 1
Hi
I have a NopCommerce version 4.10 installation.
on my category pages I have created a product ribbon to show stock status.
but if my product has product attributes and one of them is sold out (variants - like size and color) then the rule in the product ribbons shows it sold out even though there is at least one size in stock.
I thought it was because the qty for the base product might have been off, but it does not seem to be so.  it did not correct after I updated the stock qty.
Any help would be appreciated but it seems like a bug in the product ribbons script.
todor.atanasov
3 months ago
#21645 Quote
Avatar
  • Moderator
  • 147
troels_ejsing wrote:
Hi
I have a NopCommerce version 4.10 installation.
on my category pages I have created a product ribbon to show stock status.
but if my product has product attributes and one of them is sold out (variants - like size and color) then the rule in the product ribbons shows it sold out even though there is at least one size in stock.
I thought it was because the qty for the base product might have been off, but it does not seem to be so.  it did not correct after I updated the stock qty.
Any help would be appreciated but it seems like a bug in the product ribbons script.


Greetings,

If the Manage Inventory property for a particular product in nopCommerce is set to
Track inventory by product attributes, their GetTotalStockQuantity method always returns 0 for the quantity and all our products that check for stock quantity are relying on that method.

This is a known issue in nopCommerce and unfortunately, we cannot change the way it works, but I assume the main reason why they have not provided a method for checking the Stock quantity for different product variants is performance-related.
Best regards,
Todor Atanasov
Nop-templates.com