Hello,
The breadcrumb is displayed twice in a row when I set an override of the getBreadcrumbLinks() function in the ProductController.php file.
If I disable the getBreadcrumbLinks() function of the override the breadcrumb display is correct.
I specify that I did not modify the getBreadcrumbLinks() function placed in the override it is the native function of prestashop.
Do you know what can cause this problem and how to correct it?
Thanks a lot
Here is the function that causes the problem
public function getBreadcrumbLinks() { $breadcrumb = parent::getBreadcrumbLinks(); $categoryDefault = new Category($this->product->id_category_default, $this->context->language->id); foreach ($categoryDefault->getAllParents() as $category) { if ($category->id_parent != 0 && !$category->is_root_category && $category->active) { $breadcrumb['links'][] = [ 'title' => $category->name, 'url' => $this->context->link->getCategoryLink($category), ]; } } if ($categoryDefault->id_parent != 0 && !$categoryDefault->is_root_category && $categoryDefault->active) { $breadcrumb['links'][] = [ 'title' => $categoryDefault->name, 'url' => $this->context->link->getCategoryLink($categoryDefault), ]; } $breadcrumb['links'][] = [ 'title' => $this->product->name, //'title' => $this->getProductPageTitle(), 'url' => $this->context->link->getProductLink($this->product, null, null, null, null, null, (int) $this->getIdProductAttributeByRequest()), ]; return $breadcrumb; }