We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c8e86d9 commit 90563ccCopy full SHA for 90563cc
app/code/Magento/SalesRule/Helper/CartFixedDiscount.php
@@ -109,7 +109,7 @@ public function getDiscountedAmountProportionally(
109
string $discountType
110
): float {
111
$baseItemPriceTotal = $baseItemPrice * $qty - $baseItemDiscountAmount;
112
- $ratio = $baseItemPriceTotal / $baseRuleTotalsDiscount;
+ $ratio = $baseRuleTotalsDiscount != 0 ? $baseItemPriceTotal / $baseRuleTotalsDiscount : 0;
113
$discountAmount = $this->deltaPriceRound->round($ruleDiscount * $ratio, $discountType);
114
return $discountAmount;
115
}
0 commit comments