convertProductsResult example

$categoryId = (int) $this->Request()->getParam('sCategory');

        if ($this->Request()->has('productBoxLayout')) {
            $boxLayout = $this->Request()->get('productBoxLayout');
        } else {
            $boxLayout = $this->container->get(Shopware_Components_Config::class)->get('searchProductBoxLayout');
            if ($categoryId) {
                $boxLayout = $this->container->get('modules')->Categories()->getProductBoxLayout($categoryId);
            }
        }

        $products = $this->convertProductsResult($result$categoryId);

        $this->loadThemeConfig();

        $this->View()->assign([
            'sArticles' => $products,
            'pageIndex' => (int) $this->Request()->getParam('sPage'),
            'productBoxLayout' => $boxLayout,
            'sCategoryCurrent' => $categoryId,
            'sCategoryContent' => $this->container->get('modules')->Categories()->sGetCategoryContent($categoryId),
        ]);

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