zollgut Posted July 4, 2010 Share Posted July 4, 2010 I'm stuck on how to hide/display something, if product quantity is zero (i.e both the normal quantity and the quantity of every attribute is zero).I am using the following code in the product template, but running into problems:{if $product->quantity == 0 && $combination.quantity == 0}display something here{/if}The problem is that it only seems to base the query on the first combination, i.e if there is more than one combination which does have quantity, but the first does not it still displays the message.Does it need to be in a loop that goes through all the combinations first to see that they are all zero? Can anyone suggest what code I need to use for it to work?Thanks in advance! Link to comment Share on other sites More sharing options...
msk69 Posted July 4, 2010 Share Posted July 4, 2010 Hi,The code is already there, though, if a product is on 0 stock, and ordering is enabled, you still see available in the listing.If you want that changed, look at this post what helped me. http://www.prestashop.com/forums/viewthread/10229/ Link to comment Share on other sites More sharing options...
Recommended Posts