Skip to content

Commit a25a1bb

Browse files
committed
Cart error condition is changed based on logic.
1 parent 8ea62ab commit a25a1bb

File tree

1 file changed

+0
-8
lines changed

1 file changed

+0
-8
lines changed

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,6 @@ public function execute(string $maskedCartId, array $cartItems): AddProductsToCa
8080
$cartId = $this->maskedQuoteIdToQuoteId->execute($maskedCartId);
8181
$cart = $this->cartRepository->get($cartId);
8282
$allErrors = [];
83-
if ($cart->getData('has_error')) {
84-
$errors = $cart->getErrors();
85-
86-
/** @var MessageInterface $error */
87-
foreach ($errors as $error) {
88-
$allErrors[] = $this->error->create($error->getText());
89-
}
90-
}
9183

9284
$failedCartItems = $this->addItemsToCart($cart, $cartItems);
9385
$saveCart = empty($failedCartItems);

0 commit comments

Comments
 (0)