Updated the functions name, added vaidation in admin guest user update process, and code optimized
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user