Jump to content

How to remove page heading in category>product page


Recommended Posts

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

  • 2 years later...

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 by khaledsaied (see edit history)
Link to comment
Share on other sites

  • 2 months later...

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

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