getCategoryIdsWithParent example


    public function sGetCategories($id)
    {
        $pathIds = $this->getCategoryPath($id);

        $grouped = $this->getCategoryIdsWithParent($pathIds);

        $ids = array_merge($pathIdsarray_keys($grouped));

        $context = $this->contextService->getShopContext();

        $categories = $this->categoryService->getList($ids$context);

        unset($grouped[$this->baseId]);

        $tree = $this->buildTree($grouped$this->baseId);

        
Home | Imprint | This part of the site doesn't use cookies.