Fixed: Getting payment issue after applying restriction on the coupon just before checkout

This commit is contained in:
Sumit Panwar
2025-06-12 17:22:09 +05:30
parent 0540eadbeb
commit 2b49ba3fda

View File

@@ -2025,6 +2025,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);