setGeneratePartialFacets example

$facets = $facets[$categoryId];
        foreach ($facets as $facet) {
            $customFacet = $facet->getFacet();
            if ($customFacet instanceof FacetInterface) {
                $criteria->addFacet($customFacet);
            }
        }

        $facetFilter = $this->container->get('shopware_product_stream.facet_filter');
        $facetFilter->add($criteria);

        $criteria->setGeneratePartialFacets(
            $this->container->get(Shopware_Components_Config::class)->get('listingMode') === 'filter_ajax_reload'
        );

        if (!$this->Request()->get('loadFacets')) {
            $criteria->resetFacets();
        }

        $search = $this->container->get(ProductSearchInterface::class);

        if (!$this->Request()->getParam('loadProducts')) {
            $criteria->limit(1);
        }
Home | Imprint | This part of the site doesn't use cookies.