From 89ceea7e76b66c6735c31f6d93d85f117f1feddc Mon Sep 17 00:00:00 2001 From: "vishalsingh.qlo325" Date: Wed, 7 May 2025 14:56:27 +0530 Subject: [PATCH] Fixed: issues after merge with develop that caused the product from the cart to be deleted twice from cart product table --- controllers/admin/AdminOrdersController.php | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index e717e7a30..f0a1b0f60 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -6173,8 +6173,7 @@ class AdminOrdersControllerCore extends AdminController $del_id = Tools::getValue('del_id'); $room_id = Tools::getValue('id_room'); $obj_hotel_cart_detail = new HotelCartBookingData(); - $deleted = $obj_hotel_cart_detail->deleteCartBookingData($cart_id, $id_product, $room_id, $dt_frm, $dt_to); - if ($deleted) { + if ($obj_hotel_cart_detail->deleteCartBookingData($cart_id, $id_product, $room_id, $dt_frm, $dt_to)) { HotelRoomTypeFeaturePricing::deleteByIdCart($cart_id, $id_product, $room_id, $dt_frm, $dt_to ); $obj_product_process = new HotelCartBookingData(); $num_cart_rooms = 0; @@ -6182,14 +6181,8 @@ class AdminOrdersControllerCore extends AdminController $num_cart_rooms = count($rooms); } - $numDays = HotelHelper::getNumberOfDays($dt_frm, $dt_to); - $changed = $obj_product_process->changeProductDataByRoomId($room_id, $id_product, $numDays, $cart_id); - if ($changed) { - $result['status'] = 'deleted'; - $result['cart_rooms'] = $num_cart_rooms; - } else { - $result['status'] = 'failed'; - } + $result['status'] = 'deleted'; + $result['cart_rooms'] = $num_cart_rooms; } else { $result['status'] = 'failed'; }