continue;
} $quantities[$productId] =
$lineItem->
getQuantity() +
($quantities[$productId] ?? 0
);
// only needed one time to check max quantity
$refs[$productId] =
$lineItem;
} foreach ($quantities as $productId =>
$quantity) { $lineItem =
$refs[$productId];
$quantityInformation =
$lineItem->
getQuantityInformation();
if ($quantityInformation === null
) { continue;
} $minPurchase =
$quantityInformation->
getMinPurchase();
$available =
$quantityInformation->
getMaxPurchase() ?? 0;
$steps =
$quantityInformation->
getPurchaseSteps() ?? 1;
if ($available >=
$quantity) { continue;
}