Jump to content

Hide category in category block - PrestaShop™ 1.5.6.1


Recommended Posts

We are running a very happy PrestaShop™ 1.5.6.1 install here:

 

http://www.golfspin.co.uk

 

But I need to hide a category in the category block on the left so that it does not display in that block as we have another block underneath and seperate for that category.

 

When I click do not display in the category itself, this just turns the category off which is not what we need. Please tell me we do not have to start editing .tpl files just to hide a category ???

 

Also when I list categories in the admin section, I can only see 3 but there are many more ( I can find them and edit them if I use search)  - could this be a hangover from an update ?

Edited by lemonpromotions (see edit history)
Link to comment
Share on other sites

sorry for long waiting time for my reply.

i usually read all topics here :D

 

so, open this file:

category-tree-branch.tpl (located in module directory, or if it exists: in theme module directory)

 

if there is a code like:
 

<li {if isset($last) && $last == 'true'}class="last"{/if}>
	<a 
	href="{$node.link|escape:'html':'UTF-8'}"{if isset($currentCategoryId) && $node.id == $currentCategoryId} class="selected"{/if} title="{$node.desc|strip_tags|trim|escape:'html':'UTF-8'}">
		{$node.name|escape:'html':'UTF-8'}
	</a>
	{if $node.children|@count > 0}
		<ul>
			{foreach from=$node.children item=child name=categoryTreeBranch}
				{if $smarty.foreach.categoryTreeBranch.last}
					{include file="$branche_tpl_path" node=$child last='true'}
				{else}
					{include file="$branche_tpl_path" node=$child last='false'}
				{/if}
			{/foreach}
		</ul>
	{/if}
</li>

change it to:

{if $node.id!=109}
<li {if isset($last) && $last == 'true'}class="last"{/if}>
	<a 
	href="{$node.link|escape:'html':'UTF-8'}"{if isset($currentCategoryId) && $node.id == $currentCategoryId} class="selected"{/if} title="{$node.desc|strip_tags|trim|escape:'html':'UTF-8'}">
		{$node.name|escape:'html':'UTF-8'}
	</a>
	{if $node.children|@count > 0}
		<ul>
			{foreach from=$node.children item=child name=categoryTreeBranch}
				{if $smarty.foreach.categoryTreeBranch.last}
					{include file="$branche_tpl_path" node=$child last='true'}
				{else}
					{include file="$branche_tpl_path" node=$child last='false'}
				{/if}
			{/foreach}
		</ul>
	{/if}
</li>
{/if}
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...