Jump to content

[SOLVED] How to count total stock quantity of a product with many attributes in product-list.tpl


Recommended Posts

Does anybody know how to count the total stock quantity of a product with attributes in product-list.tpl ?

 

for now the code written like below :

{if $product.allow_oosp OR $product.quantity > 0 }

 

And I want to change how PS count the TOTAL QUANTITY from ALL ATTRIBUTES, because "$product.quantity" just count the quantity of DEFAULT ATTRIBUTE, or maybe counting each of attributes.

 

I tried $product.stock_quantity but it's not working

Link to comment
Share on other sites

okay, after months of looking for solutions, now the problem's solved.

 

The main problem is, I used PS 1.4.0.17... and it should be used in 1.4.1.0+

 

please refer to this thread :

http://www.prestashop.com/forums/topic/108937-solved-out-of-stock-even-if-i-have-product-in-stock-in-an-attribute/

 

btw, does anybody know how to put [sOLVED] in thread title ?

Link to comment
Share on other sites

  • 7 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...