jwich71 Posted February 5, 2015 Share Posted February 5, 2015 Hello, I'm searching for an option to automatically open the first subcategory in front office, when clicking on the parent category. But I didn't find any option in the module "blockcategories". I need this option, because my parent categories are empty, and so the customer should automatically forwarded to the first subcategory. I think this behavior could useful for many webshops. I use Prestashop 1.5.6.2 Can someone help? Greetings Link to comment Share on other sites More sharing options...
jwich71 Posted February 15, 2015 Author Share Posted February 15, 2015 My post is about two weeks old now ... has nobody an idea?? Link to comment Share on other sites More sharing options...
fred-vinapresta Posted February 16, 2015 Share Posted February 16, 2015 Hi, in your module blockcatwgories, you can modify category-tree-branch.tpl : replace <a href="{$node.link|escape:'htmlall':'UTF-8'}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'htmlall':'UTF-8'}">{$node.name|escape:'htmlall':'UTF-8'}</a> by <a href="{if $node.id == 1}link_to_your_category{else}{$node.link|escape:'htmlall':'UTF-8'}{/if}" {if isset($currentCategoryId) && $node.id == $currentCategoryId}class="selected"{/if} title="{$node.desc|escape:'htmlall':'UTF-8'}">{$node.name|escape:'htmlall':'UTF-8'}</a> Link to comment Share on other sites More sharing options...
Recommended Posts