From 477bcc6b580212c48ade786c97857592b80b679c Mon Sep 17 00:00:00 2001 From: dMetzger Date: Mon, 21 May 2012 17:33:51 +0000 Subject: [PATCH] // Cart display improved with free shipping git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15560 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Cart.php | 6 ++++++ 1 file changed, 6 insertions(+) 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; }