From 08482a44aa81b433db579f7571208696122e0fd4 Mon Sep 17 00:00:00 2001 From: Vitalij Mik Date: Thu, 14 Mar 2024 10:20:42 +0100 Subject: [PATCH] NTR: revert cart service --- src/Resources/config/services/services.xml | 2 +- src/Service/CartService.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Resources/config/services/services.xml b/src/Resources/config/services/services.xml index 1563d168e..f2859303a 100644 --- a/src/Resources/config/services/services.xml +++ b/src/Resources/config/services/services.xml @@ -126,7 +126,7 @@ - + diff --git a/src/Service/CartService.php b/src/Service/CartService.php index de8bf9b3e..ff480a650 100644 --- a/src/Service/CartService.php +++ b/src/Service/CartService.php @@ -5,7 +5,7 @@ use Kiener\MolliePayments\Compatibility\Gateway\CompatibilityGateway; use Kiener\MolliePayments\Compatibility\Gateway\CompatibilityGatewayInterface; use Shopware\Core\Checkout\Cart\Cart; -use Shopware\Core\Checkout\Cart\LineItemFactoryHandler\ProductLineItemFactory; +use Shopware\Core\Content\Product\Cart\ProductLineItemFactory; use Shopware\Core\Checkout\Cart\SalesChannel\CartService as SalesChannelCartService; use Shopware\Core\Framework\Validation\DataBag\DataBag; use Shopware\Core\System\SalesChannel\Context\SalesChannelContextService; @@ -60,7 +60,7 @@ public function addProduct(string $productId, int $quantity, SalesChannelContext { $cart = $this->getCalculatedMainCart($context); - $productItem = $this->productItemFactory->create(['id'=>$productId, 'quantity' => $quantity],$context); + $productItem = $this->productItemFactory->create($productId,[ 'quantity' => $quantity]); return $this->swCartService->add($cart, $productItem, $context); }