lemonpromotions Posted May 14, 2014 Share Posted May 14, 2014 (edited) 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 May 14, 2014 by lemonpromotions (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted May 14, 2014 Share Posted May 14, 2014 what is the id of category you want to hide? 109? am i right? Link to comment Share on other sites More sharing options...
lemonpromotions Posted May 14, 2014 Author Share Posted May 14, 2014 Yes thats correct Link to comment Share on other sites More sharing options...
lemonpromotions Posted May 15, 2014 Author Share Posted May 15, 2014 Can you help me with this ? Link to comment Share on other sites More sharing options...
lemonpromotions Posted May 15, 2014 Author Share Posted May 15, 2014 I sorted it with the code from here: http://www.prestashop.com/forums/topic/161295-hide-category-in-blockcategories/ Thanks for your time Link to comment Share on other sites More sharing options...
vekia Posted May 18, 2014 Share Posted May 18, 2014 sorry for long waiting time for my reply. i usually read all topics here 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 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