getCategoryCurrent example

$view->assign('sBasketAmount', $view->getAssign('sBasketAmount') ?: 0);
        $view->assign('sNotesQuantity', $view->getAssign('sNotesQuantity') ?: 0);
        $view->assign('sUserLoggedIn', $view->getAssign('sUserLoggedIn') ?: false);

        $view->assign('Shop', $shop);
        if (!$shop->getLocale() instanceof ShopLocale) {
            throw new RuntimeException('Shop does not have a locale set');
        }
        $view->assign('Locale', $shop->getLocale()->getLocale());

        $view->assign('sCategoryStart', $shop->getCategory()->getId());
        $view->assign('sCategoryCurrent', $this->getCategoryCurrent($view->getAssign('sCategoryStart')));
        $view->assign('sCategories', $this->getCategories($view->getAssign('sCategoryCurrent')));
        $view->assign('sMainCategories', $view->getAssign('sCategories'));
        $view->assign('sOutputNet', Shopware()->Session()->get('sOutputNet'));

        $activePage = $view->getAssign('sCustomPage')['id'] ?? null;
        $view->assign('sMenu', $this->getMenu($shop->getId()$activePage));

        $view->assign('sShopname', Shopware()->Config()->get('shopName'));
    }

    /** * Returns basket amount * * @return float */
Home | Imprint | This part of the site doesn't use cookies.