From a34dbefbd7ad0629017371e5a57e30c643777ed9 Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Fri, 23 May 2025 17:37:39 +0530 Subject: [PATCH] Fixed: fatal error in booking from front office --- classes/CustomerGuestDetail.php | 2 +- controllers/front/OrderOpcController.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/classes/CustomerGuestDetail.php b/classes/CustomerGuestDetail.php index f40bf3006..95f17d7f8 100644 --- a/classes/CustomerGuestDetail.php +++ b/classes/CustomerGuestDetail.php @@ -85,7 +85,7 @@ class CustomerGuestDetailCore extends ObjectModel * @param int id_cart * @return bool True on success, false on failure */ - public function deleteCustomerGuestInCart($idCart) + public static function deleteCustomerGuestInCart($idCart) { return Db::getInstance()->delete( 'cart_customer_guest', diff --git a/controllers/front/OrderOpcController.php b/controllers/front/OrderOpcController.php index b6cf53e3c..8663589a1 100644 --- a/controllers/front/OrderOpcController.php +++ b/controllers/front/OrderOpcController.php @@ -1126,7 +1126,7 @@ class OrderOpcControllerCore extends ParentOrderController $objCustomerGuestDetail->deleteCustomerGuestByIdCustomer($this->context->cart->id_customer, $maxGuestAccountAllowed); } // To prevent duplications for the same cart. - $objCustomerGuestDetail->deleteCustomerGuestInCart($this->context->cart->id); + CustomerGuestDetail::deleteCustomerGuestInCart($this->context->cart->id); $objCustomerGuestDetail->saveCustomerGuestInCart($this->context->cart->id, $objCustomerGuestDetail->id); Tools::redirect($this->context->link->getPageLink('order-opc', null, $this->context->language->id, array('proceed_to_payment' => 1))); }