Skip to content

Commit 5fd5a8f

Browse files
committed
ACP2E-2038: Bundle - Stock Issue when updating product from cart
1 parent 258505e commit 5fd5a8f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/code/Magento/CatalogInventory/Model/Quote/Item/QuantityValidator/QuoteItemQtyList.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class QuoteItemQtyList
3333
public function getQty($productId, $quoteItemId, $quoteId, $itemQty)
3434
{
3535
$qty = $itemQty;
36-
if (isset($this->_checkedQuoteItems[$quoteId][$productId]['qty']) && !in_array(
36+
if (isset($this->_checkedQuoteItems[$quoteId][$productId]['qty']) &&isset($quoteItemId) && !in_array(
3737
$quoteItemId,
3838
$this->_checkedQuoteItems[$quoteId][$productId]['items']
3939
)

app/code/Magento/CatalogInventory/Model/StockStateProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ public function checkQuoteItemQty(StockItemInterface $stockItem, $qty, $summaryQ
163163
return $result;
164164
}
165165

166-
if (!$this->checkQty($stockItem, $summaryQty) && !$this->checkQty($stockItem, $qty)) {
166+
if (!$this->checkQty($stockItem, $summaryQty) || !$this->checkQty($stockItem, $qty)) {
167167
$message = __('The requested qty is not available');
168168
$result->setHasError(true)
169169
->setErrorCode('qty_available')

0 commit comments

Comments
 (0)