Jump to content

Product counter to exclude products with 0 quantity


Recommended Posts

Hi,

 

I'm trying to disable products which have 0 quantity from displaying on category page. I've managed to hide successfully products using this if statement in product-list.tpl file:

 

    {if ($product.allow_oosp || $product.quantity > 0)}

{/if}

 

But the problem  now is that product counter on the top of the category page is still counting products with 0 quantity together with available products.

 

I mean, lets say I have 20 products with 0 quantity and 50 other available products. The counter on the top outputs "There are 70 products in total".

 

What could I implement to category-count.tpl or product-list.tpl to make it count only available products? Thanks!

Link to comment
Share on other sites

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...