Closed joelwmale closed 1 month ago
$conditionsForTotal->each(function (CartCondition $condition) use ($subTotal, &$total) { $toBeCalculated = $total > 0 ? $total : $subTotal; $total = $condition->applyCondition($toBeCalculated); });
This code always says to use $total if it's above 0, so if it's never above $0, it will always use the subtotal. This causes weird interactions when a discount applied to the total brings it to $0.
This code always says to use $total if it's above 0, so if it's never above $0, it will always use the subtotal. This causes weird interactions when a discount applied to the total brings it to $0.