GuestWishListPageletProductCriteriaEvent example

private readonly SystemConfigService $systemConfigService,
        private readonly EventDispatcherInterface $eventDispatcher,
        private readonly AbstractProductCloseoutFilterFactory $productCloseoutFilterFactory
    ) {
    }

    public function load(Request $request, SalesChannelContext $context): GuestWishlistPagelet
    {
        $page = new GuestWishlistPagelet();

        $criteria = $this->createCriteria($request$context);
        $this->eventDispatcher->dispatch(new GuestWishListPageletProductCriteriaEvent($criteria$context$request));

        if (empty($criteria->getIds())) {
            $response = new ProductListResponse(new EntitySearchResult(
                'wishlist',
                0,
                new ProductCollection(),
                null,
                $criteria,
                $context->getContext()
            ));
        } else {
            
Home | Imprint | This part of the site doesn't use cookies.