From fd7e41be75b6355bd1775d1e42cc2faadecd24bf Mon Sep 17 00:00:00 2001 From: Mikel Martin Date: Fri, 8 Nov 2024 12:50:59 +0100 Subject: [PATCH] Remove code blocks where the quote is saved --- Model/Api/CartProvider/CustomerCartProvider.php | 6 ------ Model/Api/CartProvider/GuestCartProvider.php | 6 ------ 2 files changed, 12 deletions(-) diff --git a/Model/Api/CartProvider/CustomerCartProvider.php b/Model/Api/CartProvider/CustomerCartProvider.php index 2083b4b..961b657 100644 --- a/Model/Api/CartProvider/CustomerCartProvider.php +++ b/Model/Api/CartProvider/CustomerCartProvider.php @@ -32,12 +32,6 @@ public function getQuote(string $cartId): Quote /** @var Quote $quote */ $quote = $this->quoteResotory->getActive($cartId); - if ($quote->getCheckoutMethod()) { - $quote->setCheckoutMethod(''); - $quote->setCustomerIsGuest(false); - $this->quoteResotory->save($quote); - } - return $quote; } } diff --git a/Model/Api/CartProvider/GuestCartProvider.php b/Model/Api/CartProvider/GuestCartProvider.php index 3476363..8b60ba3 100644 --- a/Model/Api/CartProvider/GuestCartProvider.php +++ b/Model/Api/CartProvider/GuestCartProvider.php @@ -46,12 +46,6 @@ public function getQuote(string $cartId): Quote throw NoSuchEntityException::singleField('cartId', $cartId); } - if ($quote->getCheckoutMethod() !== Onepage::METHOD_GUEST) { - $quote->setCheckoutMethod(Onepage::METHOD_GUEST); - $quote->setCustomerIsGuest(true); - $this->cartRepository->save($quote); - } - return $quote; } }