Skip to content

Commit 918060d

Browse files
author
Oleksandr Iegorov
committed
MC-42652: GraphQL - Expected behavior of add product to cart when SKU already exists
1 parent 73c3f2b commit 918060d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,14 @@ public function execute(Quote $cart, array $cartItemData): void
8989
}
9090

9191
try {
92+
$result = $cart->addProduct($product, $this->buyRequestBuilder->build($cartItemData));
93+
/*
9294
$result = $this->addProductToCartWithConcurrency(
9395
$cart,
9496
$product,
9597
$this->buyRequestBuilder->build($cartItemData)
9698
);
99+
*/
97100
} catch (Exception $e) {
98101
throw new GraphQlInputException(
99102
__(

0 commit comments

Comments
 (0)