spider17 Posted October 12, 2013 Share Posted October 12, 2013 the best way i found is to add this code in each product loop: {if $product.quantity > 0} {/if} so the old code is {foreach from=$new_products item='product' name='newProducts'} .......... {/foreach} become: {foreach from=$new_products item='product' name='newProducts'} {if $product.quantity > 0} ................ {/if} {/foreach} enjoy Link to comment Share on other sites More sharing options...
vekia Posted October 12, 2013 Share Posted October 12, 2013 hello but for example, your store displays 10 products in category page (you can define how many products you want to display in BO) script make query to database and get 10 products, for example - 9 of them have got quantity = 0. you will see only 1 product on page then. it will looks weirdy especially when you will have additional pages (pagination) one page with 1 product, several other pages with more / less products displayed... Link to comment Share on other sites More sharing options...
spider17 Posted October 12, 2013 Author Share Posted October 12, 2013 maybe you are right, i can't test it cause i dont have many products in a same category. Link to comment Share on other sites More sharing options...
vekia Posted October 13, 2013 Share Posted October 13, 2013 i can confirm, i tested it in store with ~1600 products and it works as i said, It's work, but sometimes it show 8, 9 sometimes 10 products per page Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now