Skip to content
This repository was archived by the owner on Apr 29, 2019. It is now read-only.

Commit b66b35c

Browse files
committed
MAGETWO-70323: [GITHUB] Can't add to cart Bundle product with simple product option price as "zero" #8969
1 parent 373bd01 commit b66b35c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/SalesRule/Model/Quote/Discount.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ protected function distributeDiscount(\Magento\Quote\Model\Quote\Item\AbstractIt
179179
$roundingDelta[$key] = 0.0000001;
180180
}
181181
foreach ($item->getChildren() as $child) {
182-
$ratio = $child->getBaseRowTotal() / $parentBaseRowTotal;
182+
$ratio = $parentBaseRowTotal != 0 ? $child->getBaseRowTotal() / $parentBaseRowTotal : 0;
183183
foreach ($keys as $key) {
184184
if (!$item->hasData($key)) {
185185
continue;

0 commit comments

Comments
 (0)