Skip to content

Commit 6ab215e

Browse files
author
Oleksandr Iegorov
committed
MC-42652: GraphQL - Expected behavior of add product to cart when SKU already exists
1 parent adb7ff0 commit 6ab215e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

app/code/Magento/QuoteGraphQl/Model/Cart/AddProductsToCart.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ public function __construct(
5858
*/
5959
public function execute(Quote $cart, array $cartItems): void
6060
{
61+
/*
6162
$lockName = 'cart_processing_lock_' . $cart->getId();
6263
$needToRefreshCache = false;
6364
while ($this->lockManager->isLocked($lockName)) {
@@ -69,11 +70,12 @@ public function execute(Quote $cart, array $cartItems): void
6970
if ($needToRefreshCache) {
7071
$this->refreshCartCache($cart);
7172
}
73+
*/
7274
foreach ($cartItems as $cartItemData) {
7375
$this->addProductToCart->execute($cart, $cartItemData);
7476
}
7577
$this->cartRepository->save($cart);
76-
$this->lockManager->unlock($lockName);
78+
//$this->lockManager->unlock($lockName);
7779
}
7880

7981
/**

0 commit comments

Comments
 (0)