diff --git a/classes/Cart.php b/classes/Cart.php index 1444a2aad..e826b3f97 100644 --- a/classes/Cart.php +++ b/classes/Cart.php @@ -635,8 +635,6 @@ class CartCore extends ObjectModel return array(); } - $customer = new Customer($this->id_customer); - Context::getContext()->customer = $customer; $cart_shop_context = Context::getContext()->cloneContext(); foreach ($result as &$row) { diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index 90593bfbc..cad0ddada 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -1680,6 +1680,8 @@ class AdminOrdersControllerCore extends AdminController $this->context->cart = $objCart; $this->context->currency = new Currency((int)$objCart->id_currency); + // Setting the customer in context to get the order total with the group discount. + $this->context->customer = new Customer($objCart->id_customer); $this->errors = HotelCartBookingData::validateCartBookings(); $orderTotal = $objCart->getOrderTotal(true, Cart::BOTH); if ($objCart->is_advance_payment) {