protected function buildCategoryBreadcrumbsProduct($category_id, array &$breadcrumbs)
    {
        if (!empty($this->data_categories[$category_id]['parents'])) {

            $category = $this->data_categories[$category_id];
            $parent = reset($category['parents']);
            $url = empty($category['alias']) ? "category/$category_id" : $category['alias'];

            $breadcrumb = array(
                'url' => $this->url($url),
                'text' => $category['title']
            );

            array_unshift($breadcrumbs, $breadcrumb);
            $this->buildCategoryBreadcrumbsProduct($parent, $breadcrumbs);
        }
    }
protected function buildCategoryBreadcrumbsProduct($category_id, array &$breadcrumbs)
    {
        if (!empty($this->data_categories[$category_id]['parents'])) {

            $category = $this->data_categories[$category_id];
            $parent = reset($category['parents']);
            $url = empty($category['alias']) ? "category/$category_id" : $category['alias'];

            $breadcrumb = array(
                'url' => $this->url($url),
                'text' => $category['title']
            );

            array_unshift($breadcrumbs, $breadcrumb);
            $this->buildCategoryBreadcrumbsProduct($parent, $breadcrumbs);
        }
    }
protected function buildCategoryBreadcrumbsProduct ( $ category_id , array & $ breadcrumbs ) { if ( ! empty ( $ this -> data_categories [ $ category_id ] [ 'parents' ] ) ) { $ category = $ this -> data_categories [ $ category_id ] ; $ parent = reset ( $ category [ 'parents' ] ) ; $ url = empty ( $ category [ 'alias' ] ) ? "category/$category_id" : $ category [ 'alias' ] ; $ breadcrumb = array ( 'url' => $ this -> url ( $ url ) , 'text' => $ category [ 'title' ] ) ; array_unshift ( $ breadcrumbs , $ breadcrumb ) ; $ this -> buildCategoryBreadcrumbsProduct ( $ parent , $ breadcrumbs ) ; } }
Builds an array of breadcrumbs containing all parent categories
@param integer $category_id
@param array $breadcrumbs
Builds an array of breadcrumbs containing all parent categories