Merge pull request #1487 from sumitwebkul/gli-2693

Fixed: Getting payment issue after applying restriction on the coupon just before checkout
This commit is contained in:
Rohit Jain
2025-06-12 18:46:35 +05:30
committed by GitHub

View File

@@ -2024,6 +2024,11 @@ class AdminOrdersControllerCore extends AdminController
$this->context->currency = new Currency((int)$objCart->id_currency);
$this->errors = HotelCartBookingData::validateCartBookings(!Configuration::get('PS_ALLOW_ADD_ALL_SERVICES_IN_BOOKING'));
// Remove cart rules and add if any changes
CartRule::autoRemoveFromCart($this->context);
CartRule::autoAddToCart($this->context);
$orderTotal = $objCart->getOrderTotal(true, Cart::BOTH);
if ($objCart->is_advance_payment) {
$advancePaymentAmount = $objCart->getOrderTotal(true, Cart::ADVANCE_PAYMENT);