Jump to content

{$subcat.products_number} incorrect value?

Recommended Posts


Was just wondering if anyone else had noticed {$subcat.products_number} seems to output an incorrect / unexpected value?

On a category page that has sub cats, i use {$subcat.products_number} next to each subcat title expecting it show the number of products for that subcat however the count seems wrong.

Example Womens T-shirt 

Category assigned as followed :

Fashion (Main Cat)

Fashion > Womens (Additional Cat)

Fashion > Womens > T-shirts (Additional Cat)

A single product with those 2 additional sub categories assigned makes the count show 2 instead of 1 for Womens.

So it would seem when the product count is done for the subcats its goes through the sub cats but recounts the same product if appears in a related subcat (if that makes sense - its late here haha)


Live example see http://nitefox.x10host.com/fashion.html change the skin (bottom left) to Dillion and click the sliders button next to the grid/list layout buttons and you will see Mens (12) and Womens (8) which should in fact be Mens (6) and Womens (4) (each of the fashion products are assigned categories similar to the example above)

So just wondered if this is bug before i post it as an issue on github..



Link to post
Share on other sites

When I went through this code change, if I recall, the count included the products of Women, plus the sum of the counts for all descendant categories of Women.

I will need to double-check.


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...