Jump to content

Problem with breadcrumbs , showing categories incorrectly.


Recommended Posts

hi all developers , i have a problem with prestashop breadcrumbs in my template .

this is our categories :

 

Parent Category >
                             Sub Category 1 > Products ...
                             Sub Category 2 > Products ...
                             Sub Category 3 > Products ...
                             Sub Category 4 > Products ...

when i click on a Sub category , for example Sub Category 2 , the breadcrumb shows like this :

Home > Parent Category > Sub Category 1 > Sub Category 2 > Parent Category > Sub Category 3

 

and when i click on a product it shows like this :

Home > Product Name

i have installed jbx_menu module and i'm using it instead of top horizontal menu module , could it be because of this module ?

here are the codes that i think there is something wrong with those codes :

in controllers/front/CategoryController.php :

'path' => Tools::getPath($this->category->id),

in classes/Tools.php :

public static function getPath($id_category, $path = '', $link_on_the_item = false, $category_type = 'products', Context $context = null)

and :

return Tools::getPath($category->id_parent, $full_path, $link_on_the_item, $category_type);

and :

return Tools::getPath($id_category, $category->name, true, $type_cat).'<span class="navigation-pipe">'.$pipe.'</span> <span class="navigation_product">'.htmlentities($end, ENT_NOQUOTES, 'UTF-8').'</span>';

 

someone help me please , i don't know what's the problem !

thanks .

Link to comment
Share on other sites

  • 2 months later...
×
×
  • Create New...