Skip to content

Commit 21d5691

Browse files
author
Mastiuhin Olexandr
committed
MC-29745: Bundle child product with qty increments error
1 parent f540160 commit 21d5691

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,11 @@ private function checkOptionsQtyIncrements(Item $quoteItem, array $options): voi
222222
{
223223
$removeErrors = true;
224224
foreach ($options as $option) {
225+
$optionValue = $option->getValue();
226+
$optionQty = $quoteItem->getData('qty') * $optionValue;
225227
$result = $this->stockState->checkQtyIncrements(
226228
$option->getProduct()->getId(),
227-
$quoteItem->getData('qty'),
229+
$optionQty,
228230
$option->getProduct()->getStore()->getWebsiteId()
229231
);
230232
if ($result->getHasError()) {

0 commit comments

Comments
 (0)