graes0 Posted August 23, 2008 Share Posted August 23, 2008 I have parent categories having subcategories but in the parent category there are no products.When you go to the partent category page it says 0 products. The child categories have multiple products.How to change the counting of the products so it also count the product of the child categories. This way the parent page will count all the products that fall under this parent.Thanks in advance,Geert Link to comment Share on other sites More sharing options...
vinoalvino Posted August 23, 2008 Share Posted August 23, 2008 Ceck parent and children is the only way ... Link to comment Share on other sites More sharing options...
graes0 Posted August 23, 2008 Author Share Posted August 23, 2008 Thanks for the reply but I know. I don't want to check the parent category because this way the products are also shown in the parent category page. Link to comment Share on other sites More sharing options...
manew Posted August 25, 2008 Share Posted August 25, 2008 Hi, if someone has the solution... It's not good for the "commerce" ;-)Thanks for this upup. Link to comment Share on other sites More sharing options...
zenrider420 Posted September 16, 2008 Share Posted September 16, 2008 Thanks for the reply but I know. I don't want to check the parent category because this way the products are also shown in the parent category page. Did you ever figure out how to do this? I am having the same issue... Link to comment Share on other sites More sharing options...
ken Posted September 29, 2008 Share Posted September 29, 2008 HiThis does need fixing. 0 Products makes it appear that there are no products at all.In your Theme folderOpen category.tpl and delete (comment) Line 13 {$nb_products|intval} {if $nb_products>1}{l s='products'}{else}{l s='product'}{/if} Or replace with this {if $nb_products>0} {$nb_products|intval} {if $nb_products>1}{l s='products'}{else}{l s='product'}{/if} {/if} This will only display the number of products if it contains products.Or even This {if $nb_products>0} {$nb_products|intval} {if $nb_products>1}{l s='products'}{else}{l s='product'}{/if} {else} - click a subcategory {/if} RegardsKen. Link to comment Share on other sites More sharing options...
zenrider420 Posted September 29, 2008 Share Posted September 29, 2008 Ken, you are the man!Thanks!!! Link to comment Share on other sites More sharing options...
bellini13 Posted May 5, 2011 Share Posted May 5, 2011 Thanks Ken, here is the change that will work in v1.4 of prestashop, since the category.tpl is a bit different now. ThisChange Line 35-40 from: {if $category->id == 1 OR $nb_products == 0}{l s='There are no products.'} {else} {if $nb_products == 1}{l s='There is'}{else}{l s='There are'}{/if} {$nb_products} {if $nb_products == 1}{l s='product.'}{else}{l s='products.'}{/if} {/if} to... {if $nb_products>0} {if $nb_products == 1}{l s='There is'}{else}{l s='There are'}{/if} {$nb_products} {if $nb_products == 1}{l s='product.'}{else}{l s='products.'}{/if} {else} - click a subcategory {/if} Link to comment Share on other sites More sharing options...
eclipselandscapes Posted October 4, 2011 Share Posted October 4, 2011 hey guys did anyone find a code so the parent navigation can count all products in the subcategories cheers kev Link to comment Share on other sites More sharing options...
w3bsolutions Posted October 24, 2011 Share Posted October 24, 2011 hey guys did anyone find a code so the parent navigation can count all products in the subcategories cheers kev Bump. I think this is really important as a commercial website. If you can see all the subcategories but the parent category only counts the product you have assigned to the parent category (which could be considered "featured products" of that main category) it causes the users to think you only have a few products of that commercial line, when you might have hundreds in the subcategories. I think i am going to open a bug/feature request with this... Link to comment Share on other sites More sharing options...
w3bsolutions Posted October 24, 2011 Share Posted October 24, 2011 Please vote!! http://forge.prestashop.com/browse/PSCFI-3883 Link to comment Share on other sites More sharing options...
Recommended Posts