From 362740536389a84a459729063f40a62eecf7c295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrgen=20H=C3=B6rmann?= Date: Fri, 28 Jul 2023 12:38:25 +0200 Subject: [PATCH] Load variant selection on search result page --- src/Subscriber/ProductListingResultLoadedSubscriber.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Subscriber/ProductListingResultLoadedSubscriber.php b/src/Subscriber/ProductListingResultLoadedSubscriber.php index 1bb3e31..c35f5d6 100644 --- a/src/Subscriber/ProductListingResultLoadedSubscriber.php +++ b/src/Subscriber/ProductListingResultLoadedSubscriber.php @@ -4,6 +4,7 @@ use SasVariantSwitch\SasVariantSwitch; use Shopware\Core\Content\Product\Events\ProductListingResultEvent; +use Shopware\Core\Content\Product\Events\ProductSearchResultEvent; use Shopware\Core\Content\Product\ProductCollection; use Shopware\Core\System\SystemConfig\SystemConfigService; use Symfony\Component\EventDispatcher\EventSubscriberInterface; @@ -30,6 +31,9 @@ public static function getSubscribedEvents() ProductListingResultEvent::class => [ ['handleProductListingLoadedRequest', 201], ], + ProductSearchResultEvent::class => [ + ['handleProductListingLoadedRequest', 201], + ], ProductBoxLoadedEvent::class => [ ['handleProductBoxLoadedRequest', 201], ],