diff --git a/classes/Cart.php b/classes/Cart.php index de6fade84..332b2cc11 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -2664,6 +2664,12 @@ class CartCore extends ObjectModel { $cart_rule['value_real'] -= $total_shipping; $cart_rule['value_tax_exc'] = $total_shipping_tax_exc; + + // Update total discounts + $total_discounts = Tools::ps_round($total_discounts - $total_shipping, (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + $total_discounts_tax_exc = Tools::ps_round($total_discounts_tax_exc - $total_shipping_tax_exc, (int)$context->currency->decimals * _PS_PRICE_DISPLAY_PRECISION_); + + // Update total shipping $total_shipping = 0; $total_shipping_tax_exc = 0; }