Reecreations Posted December 12, 2011 Share Posted December 12, 2011 Hi, I am developing my first website in prestashop. I want to remove the heading (seen on each product page next to breadscrumb)"There are # products in this category "on all category pages and also the error "There is no product in this category". Do i need to modify header.tpl ?? Thanks in advance Ree Link to comment Share on other sites More sharing options...
CartExpert.net Posted December 12, 2011 Share Posted December 12, 2011 Hello! You need to edit 'category.tpl'. Remove: <span class="category-product-count"> {include file="$tpl_dir./category-count.tpl"} </span> and {elseif !isset($subcategories)} <p class="warning">{l s='There are no products in this category.'}</p> Link to comment Share on other sites More sharing options...
Reecreations Posted December 12, 2011 Author Share Posted December 12, 2011 Hi Expert , It worked like a magic Thanks lot !! Ree Link to comment Share on other sites More sharing options...
khaledsaied Posted December 26, 2013 Share Posted December 26, 2013 (edited) Hello! You need to edit 'category.tpl'. Remove: <span class="category-product-count"> {include file="$tpl_dir./category-count.tpl"} </span> and Hi CartExpert, I want to do something like that, but I only want it to apply for the main category, my category.tpl: <div class="resumecat category-product-count"> <!--{include file="$tpl_dir./category-count.tpl"}--> </div> </div> <div class="content_sortPagiBar span5"> <div class="sortPagiBar"> <!--{include file="./product-sort.tpl"}--> <!--{include file="./product-compare.tpl"}--> {include file="./nbr-product-page.tpl"} </div> </div> I want to remove the files that is commented out but only for the top category page and not for subcategories. SOLVED: I found a solution. The solution was to put an IF-statement around the .tpl-files which only should be visible on the subcategories, like that: <div class="resumecat category-product-count"> {if !(($category->id == '6'))} {include file="$tpl_dir./category-count.tpl"} {/if} </div> </div> <div class="content_sortPagiBar span5"> <div class="sortPagiBar"> {if !(($category->id == '6'))} {include file="./product-sort.tpl"} {include file="./product-compare.tpl"} {/if} {include file="./nbr-product-page.tpl"} </div> </div> category->id==6 is the top/main category, the page where count. etc. should not be visble . Edited December 26, 2013 by khaledsaied (see edit history) Link to comment Share on other sites More sharing options...
preserver Posted March 9, 2014 Share Posted March 9, 2014 KhaledSaied, I like what you did, but I can't get it to work. What version of prestashop are you using? I am using 1.5.4. I tried editing the category.tpl in my variation of the default theme. My file looks a little different, and when I added that "{if !(($category->id == '6'))}" line (second line in your code), it created an error/ failure in the site. I would appreciate any help either turning off the 'no products in category' for a main category, or just disabling it altogether. Thank you! 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