jordifs Posted July 21, 2015 Share Posted July 21, 2015 I have a new PS v1.6.1.0 with 105 categories. I configured the module blacktopmenu to show the relevant categories. The menu works fine. It shows each configured category and their child-categories. The menu shows URL-links to browse the products available for each child-category. The problem is that it does not show this URL-link for the parent-category. The most annoying is that some categories have no child-categories and no URL-link is provided to browse its content. The address provided target the homepage: /index.php The issue: ¿is this behaviour a bug? ¿is it a feature I need to enable somehow? I do not see module configuration parameters to enable this. Thanks in advance for your support. Link to comment Share on other sites More sharing options...
woodland Posted October 22, 2015 Share Posted October 22, 2015 (edited) Have you resolved this problem? I have exactly the same problem. But I think the fix is available somewhere because TemplateMonster themes have this problem fixed. The Prestashop Demo at demo.prestashop.com doesn't have this problem either. I've tried old and new versions of this module and the problem is always there. Looks like that in blocktopmenu.php the $link is returing empty link if ($category['level_depth'] > 1) { $cat = new Category($category['id_category']); $link = Tools::HtmlEntitiesUTF8($cat->getLink()); } else { $link = $this->context->link->getPageLink('index'); } So it's always showing link to "index" page. How to fix this? Edited October 22, 2015 by woodland (see edit history) Link to comment Share on other sites More sharing options...
ThomasHulin85 Posted July 30, 2016 Share Posted July 30, 2016 (edited) try this in blocktopmenu.php : (it's works for me) delete line 612 : $html .= '<a href="'.$link.'" title="'.$category['name'].'">'.$category['name'].'</a>'; and add : if ($is_children == 0) $html .= '<a href="'.$category['id_category'].'-'.$category['link_rewrite'].'" title="'.$category['name'].'">'.$category['name'].'</a>'; else $html .= '<a href="'.$link.'" title="'.$category['name'].'">'.$category['name'].'</a>'; Edited July 30, 2016 by ThomasHulin85 (see edit history) 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