diff --git a/Classes/EventListener/Create/CreateCartProduct.php b/Classes/EventListener/Create/CreateCartProduct.php index b9233489..27494fb0 100644 --- a/Classes/EventListener/Create/CreateCartProduct.php +++ b/Classes/EventListener/Create/CreateCartProduct.php @@ -17,8 +17,7 @@ class CreateCartProduct { - public function __construct(protected DetailPageLinkFactoryInterface $detailPageLinkFactory) - {} + public function __construct(protected DetailPageLinkFactoryInterface $detailPageLinkFactory) {} public function __invoke(RetrieveProductsFromRequestEvent $event): void { $request = $event->getRequest(); @@ -56,7 +55,7 @@ public function __invoke(RetrieveProductsFromRequestEvent $event): void $cartProduct->setIsVirtualProduct(true); } - if($request->getArgument('detailPageUid')){ + if ($request->getArgument('detailPageUid')) { $detailPageLink = $this->detailPageLinkFactory->getDetailPageLink( (int)$request->getArgument('detailPageUid'), 'cartproducts', @@ -66,7 +65,6 @@ public function __invoke(RetrieveProductsFromRequestEvent $event): void $cartProduct->setDetailPageLink($detailPageLink); } - $event->setCartProduct($cartProduct); } }