Fixed: the price stays the same for the booking if admin selects a customer with a group discount and then refreshes the page
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user