ProductSuggestCriteriaEvent example



        $criteria->addFilter(
            new ProductAvailableFilter($context->getSalesChannel()->getId(), ProductVisibilityDefinition::VISIBILITY_SEARCH)
        );

        $this->searchBuilder->build($request$criteria$context);

        $this->processor->prepare($request$criteria$context);

        $this->eventDispatcher->dispatch(
            new ProductSuggestCriteriaEvent($request$criteria$context),
            ProductEvents::PRODUCT_SUGGEST_CRITERIA
        );

        $result = $this->productListingLoader->load($criteria$context);

        $result = ProductListingResult::createFrom($result);

        $this->processor->process($request$result$context);

        $this->eventDispatcher->dispatch(
            new ProductSuggestResultEvent($request$result$context),
            
Home | Imprint | This part of the site doesn't use cookies.