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 83e5f9b commit 2133badCopy full SHA for 2133bad
app/code/Magento/SalesRule/Helper/CartFixedDiscount.php
@@ -127,7 +127,7 @@ public function getShippingDiscountAmount(
127
float $shippingAmount,
128
float $quoteBaseSubtotal
129
): float {
130
- $ratio = $shippingAmount / $quoteBaseSubtotal;
+ $ratio = $quoteBaseSubtotal != 0 ? $shippingAmount / $quoteBaseSubtotal : 0;
131
return $this->priceCurrency
132
->roundPrice(
133
$rule->getDiscountAmount() * $ratio
0 commit comments