Updated the flow, changed the customer guest detail database, save update and delete process

This commit is contained in:
vishalsingh.qlo325
2025-03-18 17:27:30 +05:30
parent 06ad156a3e
commit cbd927ffa5
17 changed files with 489 additions and 98 deletions

View File

@@ -400,16 +400,16 @@ abstract class PaymentModuleCore extends Module
}
// save customer guest information
if ($id_customer_guest_detail = CartCustomerGuestDetail::getCartCustomerGuest($this->context->cart->id)) {
if (Validate::isLoadedObject($objCartCustomerGuestDetail = new CartCustomerGuestDetail(
if ($id_customer_guest_detail = CustomerGuestDetail::getCartCustomerGuest($this->context->cart->id)) {
if (Validate::isLoadedObject($objCustomerGuestDetail = new CustomerGuestDetail(
$id_customer_guest_detail
))) {
$objOrderCustomerGuestDetail = new OrderCustomerGuestDetail();
$objOrderCustomerGuestDetail->id_gender = $objCartCustomerGuestDetail->id_gender;
$objOrderCustomerGuestDetail->firstname = $objCartCustomerGuestDetail->firstname;
$objOrderCustomerGuestDetail->lastname = $objCartCustomerGuestDetail->lastname;
$objOrderCustomerGuestDetail->email = $objCartCustomerGuestDetail->email;
$objOrderCustomerGuestDetail->phone = $objCartCustomerGuestDetail->phone;
$objOrderCustomerGuestDetail->id_gender = $objCustomerGuestDetail->id_gender;
$objOrderCustomerGuestDetail->firstname = $objCustomerGuestDetail->firstname;
$objOrderCustomerGuestDetail->lastname = $objCustomerGuestDetail->lastname;
$objOrderCustomerGuestDetail->email = $objCustomerGuestDetail->email;
$objOrderCustomerGuestDetail->phone = $objCustomerGuestDetail->phone;
$objOrderCustomerGuestDetail->id_order = (int)$order->id;
$objOrderCustomerGuestDetail->save();
}