Skip to content

Commit 05853c0

Browse files
committed
ACP2E-2174: allow qty change for cart items without errors
1 parent 5c5c62d commit 05853c0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app/code/Magento/Checkout/Controller/Cart/UpdateItemQty.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ public function execute()
129129
private function updateItemQuantity(Item $item, float $qty)
130130
{
131131
if ($qty > 0) {
132+
$item->clearMessage();
133+
$item->setHasError(false);
134+
$item->setQty($qty);
135+
132136
if ($item->getHasError()) {
133137
throw new LocalizedException(__($item->getMessage()));
134-
} else {
135-
$item->clearMessage();
136-
$item->setHasError(false);
137-
$item->setQty($qty);
138138
}
139139
}
140140
}

0 commit comments

Comments
 (0)