rob84 Posted November 13, 2015 Share Posted November 13, 2015 (edited) Hello. I'm trying to get only subcategories of selected category. I have this code in category-tree-branch.tpl {foreach $node.id as $value} {if $value == $currentCategoryId} <li> <a id="cat-{$node.id}" href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'} <span class="numbers-prod-count">({$node.products})</span></a> {if $node.children|@count > 0} <ul> {foreach from=$node.children item=child name=categoryTreeBranch} {include file=$branche_tpl_path_sub node=$child last='false'} {/foreach} </ul> {/if} </li> {break} <li> <a id="cat-{$node.id}" href="{$node.link}" {if isset($currentCategoryId) && ($node.id == $currentCategoryId)}class="selected"{/if} title="{$node.desc|escape:html:'UTF-8'}">{$node.name|escape:html:'UTF-8'} <span class="numbers-prod-count">({$node.products})</span></a> </li> {/if} {/foreach} I can see right the 3th level subcategory if I click on 2nd level category, but i'm unable to see other categories. See screenshots attached. Thank you. Edited November 13, 2015 by rob84 (see edit history) Link to comment Share on other sites More sharing options...
venditdevs Posted November 19, 2015 Share Posted November 19, 2015 We are experiencing the same problem over here in a shop of a customer of ours ( Prestashop 1.6.1.2 ) Did you al;lready solved it ? Link to comment Share on other sites More sharing options...
NemoPS Posted November 21, 2015 Share Posted November 21, 2015 There is an option for it in the module's configuration page:http://screencast.com/t/muPDuVbdbWdThe selected option should only display current subcategories Link to comment Share on other sites More sharing options...
rob84 Posted November 21, 2015 Author Share Posted November 21, 2015 There is an option for it in the module's configuration page: http://screencast.com/t/muPDuVbdbWd The selected option should only display current subcategories Unfortunately the default PS 1.4.7.3 category block, doesnt' have these options 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