pradchal Posted September 17, 2010 Share Posted September 17, 2010 I have a category called Silver Rings. Under this category I have 2 sub-categories, Silver Rings with stone and Silver Rings without stone. I have several products under both of these sub-categories but not under the category "Silver Rings" itself.However when I click on the category "Silver Rings" it takes me to the page that displays the sub-categories and their images. On this page next to the category title, I can see "Products 0". I think this could be quite misleading to some of my customers. How can I get rid of this from this page? Link to comment Share on other sites More sharing options...
rocky Posted September 18, 2010 Share Posted September 18, 2010 Just comment out the code that displays that message. For example, in PrestaShop v1.3.1, change line 8 of category.tpl from: {if $nb_products == 0}{l s='There are no products.'} to: {if $nb_products == 0}{*{l s='There are no products.'}*} Link to comment Share on other sites More sharing options...
pradchal Posted September 18, 2010 Author Share Posted September 18, 2010 Hi rocky,Following is the code from my category.tpl and I do not see the code that you mentioned {include file=$tpl_dir./breadcrumb.tpl} {include file=$tpl_dir./errors.tpl} {if $category->id AND $category->active} {$category->name|escape:'htmlall':'UTF-8'} {$nb_products|intval} {if $nb_products>1}{l s='products'}{else}{l s='product'}{/if} {if $category->description} {$category->description} {/if} {if isset($subcategories)} <!-- Subcategories --> {l s='Subcategories'} {foreach from=$subcategories item=subcategory} getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> {if $subcategory.id_image} getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" /> {else} {/if} getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'} {/foreach} {/if} {if $products} {include file=$tpl_dir./product-sort.tpl} {include file=$tpl_dir./product-list.tpl products=$products} {include file=$tpl_dir./pagination.tpl} {elseif !isset($subcategories)} {l s='There is no product in this category.'} {/if} {elseif $category->id} {l s='This category is currently unavailable.'} {/if} Link to comment Share on other sites More sharing options...
rocky Posted September 18, 2010 Share Posted September 18, 2010 It looks like you are using a PrestaShop v1.2.5 theme. In that case, change line 7 from: {$nb_products|intval} {if $nb_products>1}{l s='products'}{else}{l s='product'}{/if} to: {if $nb_products|intval > 0}{$nb_products|intval} {if $nb_products>1}{l s='products'}{else}{l s='product'}{/if}{/if} Link to comment Share on other sites More sharing options...
pradchal Posted September 18, 2010 Author Share Posted September 18, 2010 Thank you very much rockey.It solved it. Link to comment Share on other sites More sharing options...
GG.Pepe Posted October 4, 2010 Share Posted October 4, 2010 It looks like you are using a PrestaShop v1.2.5 theme. In that case, change line 7 from: {$nb_products|intval} {if $nb_products>1}{l s='products'}{else}{l s='product'}{/if} to: {if $nb_products|intval > 0}{$nb_products|intval} {if $nb_products>1}{l s='products'}{else}{l s='product'}{/if}{/if} ok this work but if i want delete number of products from all pages in prestashop what i must do? Link to comment Share on other sites More sharing options...
rocky Posted October 4, 2010 Share Posted October 4, 2010 Just comment out the code: {*{$nb_products|intval} {if $nb_products>1}{l s='products'}{else}{l s='product'}{/if}*} Link to comment Share on other sites More sharing options...
GG.Pepe Posted October 4, 2010 Share Posted October 4, 2010 Just comment out the code: {*{$nb_products|intval} {if $nb_products>1}{l s='products'}{else}{l s='product'}{/if}*} thx dude it work perfect!! Link to comment Share on other sites More sharing options...
Malk Posted November 10, 2011 Share Posted November 10, 2011 Rocky, would you know what to do in v.1.4 ? Link to comment Share on other sites More sharing options...
Recommended Posts