Updated the functions name, added vaidation in admin guest user update process, and code optimized

This commit is contained in:
vishalsingh.qlo325
2025-05-15 18:50:06 +05:30
parent e30e77112e
commit 65ba68d517
10 changed files with 172 additions and 88 deletions

View File

@@ -400,9 +400,9 @@ abstract class PaymentModuleCore extends Module
}
// save customer guest information
if ($id_customer_guest_detail = CustomerGuestDetail::getCartCustomerGuest($this->context->cart->id)) {
if ($idCustomerGuestDetail = CustomerGuestDetail::getCustomerGuestIdByIdCart($this->context->cart->id)) {
if (Validate::isLoadedObject($objCustomerGuestDetail = new CustomerGuestDetail(
$id_customer_guest_detail
$idCustomerGuestDetail
))) {
$objOrderCustomerGuestDetail = new OrderCustomerGuestDetail();
$objOrderCustomerGuestDetail->id_gender = $objCustomerGuestDetail->id_gender;
@@ -1229,9 +1229,9 @@ abstract class PaymentModuleCore extends Module
);
}
// send mail to customer guest if customer booked for someone other.
if ($id_customer_guest_detail = OrderCustomerGuestDetail::isCustomerGuestBooking($order->id)) {
if ($idCustomerGuestDetail = OrderCustomerGuestDetail::isCustomerGuestBooking($order->id)) {
if ($objOrderCustomerGuestDetail = new OrderCustomerGuestDetail(
$id_customer_guest_detail
$idCustomerGuestDetail
)) {
if (Validate::isEmail($objOrderCustomerGuestDetail->email)) {
$data['{firstname}'] = $objOrderCustomerGuestDetail->firstname;
@@ -1384,7 +1384,7 @@ abstract class PaymentModuleCore extends Module
} // End foreach $order_detail_list
// delete cart feature prices after booking creation success
HotelRoomTypeFeaturePricing::deleteFeaturePrices($id_cart);
HotelRoomTypeFeaturePricing::deleteByIdCart($id_cart);
if (count($cart_rules)) {
foreach ($cart_rules as $idCartRule => $cartRule) {