Merge branch 'develop' into gli-2393

This commit is contained in:
vishalsingh.qlo325
2025-02-21 15:45:00 +05:30
37 changed files with 236 additions and 145 deletions

View File

@@ -983,9 +983,6 @@ abstract class PaymentModuleCore extends Module
}
}
// delete cart feature prices after booking creation success
HotelRoomTypeFeaturePricing::deleteByIdCart($id_cart);
if (self::DEBUG_MODE) {
PrestaShopLogger::addLog('PaymentModule::validateOrder - Hook validateOrder is about to be called', 1, null, 'Cart', (int)$id_cart, true);
}
@@ -1013,7 +1010,11 @@ abstract class PaymentModuleCore extends Module
$new_history = new OrderHistory();
$new_history->id_order = (int)$order->id;
$new_history->changeIdOrderState((int)$id_order_state, $order, true);
if ($send_mails) {
// Emails regarding awaiting payment should not be sent to customers if the payment amount in the order is 0.
$sendOrderStatusMail = (($id_order_state == Configuration::get('PS_OS_AWAITING_REMOTE_PAYMENT') || $id_order_state == Configuration::get('PS_OS_AWAITING_PAYMENT')) && $order->total_paid > 0) ? true : false;
if ($send_mails && $sendOrderStatusMail) {
$new_history->addWithemail(true, $extra_vars);
} else {
$new_history->add(true);
@@ -1389,6 +1390,9 @@ abstract class PaymentModuleCore extends Module
}
} // End foreach $order_detail_list
// delete cart feature prices after booking creation success
HotelRoomTypeFeaturePricing::deleteByIdCart($id_cart);
if (count($cart_rules)) {
foreach ($cart_rules as $idCartRule => $cartRule) {