From 6fbaafca4c4dc1bb391c22e6209740aafd676e0c Mon Sep 17 00:00:00 2001 From: rGaillard Date: Fri, 31 Aug 2012 14:52:54 +0000 Subject: [PATCH] // Fix PSCFV-3840 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@17136 b9a71923-0436-4b27-9f14-aed3839534dd --- classes/Cart.php | 4 ++-- controllers/admin/AdminCartsController.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/Cart.php b/classes/Cart.php index 5f24b6f50..62a9dcec1 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -1228,14 +1228,14 @@ class CartCore extends ObjectModel return true; } - public static function getTotalCart($id_cart, $use_tax_display = false) + public static function getTotalCart($id_cart, $use_tax_display = false, $type = CART::BOTH) { $cart = new Cart($id_cart); if (!Validate::isLoadedObject($cart)) die(Tools::displayError()); $with_taxes = $use_tax_display ? $cart->_taxCalculationMethod != PS_TAX_EXC : true; - return Tools::displayPrice($cart->getOrderTotal($with_taxes), Currency::getCurrencyInstance((int)$cart->id_currency), false); + return Tools::displayPrice($cart->getOrderTotal($with_taxes, $type), Currency::getCurrencyInstance((int)$cart->id_currency), false); } diff --git a/controllers/admin/AdminCartsController.php b/controllers/admin/AdminCartsController.php index 72f706dea..2efd96453 100755 --- a/controllers/admin/AdminCartsController.php +++ b/controllers/admin/AdminCartsController.php @@ -721,8 +721,8 @@ class AdminCartsControllerCore extends AdminController { $context = Context::getContext(); $context->cart = new Cart($id_cart); - $context->customer = new Customer($context->cart->id_customer); - return Cart::getTotalCart($id_cart, true); + $context->customer = new Customer((int)$context->cart->id_customer); + return Cart::getTotalCart($id_cart, true, Cart::BOTH_WITHOUT_SHIPPING); } public static function replaceZeroByShopName($echo, $tr)