Example #1
0
 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) {
             $breadcrumb['links'][] = $this->getCategoryPath($category);
         }
     }
     if (!$categoryDefault->is_root_category) {
         $breadcrumb['links'][] = $this->getCategoryPath($categoryDefault);
     }
     $breadcrumb['links'][] = array('title' => $this->context->controller->product->name, 'url' => $this->context->link->getProductLink($this->context->controller->product));
     return $breadcrumb;
 }