From 1b56421bcf1e017a3ac27bceb832dbe8fd411272 Mon Sep 17 00:00:00 2001 From: amit sharma Date: Tue, 22 Sep 2026 10:13:11 +0530 Subject: [PATCH] Fix: Resolve error on Order Detail page after room reallocation Co-authored-by: Name --- .../hotelreservationsystem/classes/HotelBookingDetail.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/modules/hotelreservationsystem/classes/HotelBookingDetail.php b/modules/hotelreservationsystem/classes/HotelBookingDetail.php index 36996e18a..623f58783 100644 --- a/modules/hotelreservationsystem/classes/HotelBookingDetail.php +++ b/modules/hotelreservationsystem/classes/HotelBookingDetail.php @@ -2199,6 +2199,13 @@ class HotelBookingDetail extends ObjectModel $objBookingDetail->comment = $objCartBookingData->comment; $objBookingDetail->id_status = 1; $objBookingDetail->room_type_name = Product::getProductName($idNewRoomType, null, $objOrder->id_lang); + + // Save room selling object names as they are at the time of reallocation + if ($roomTypeInfo = $objRoomType->getRoomTypeInfoByIdProduct($idNewRoomType, $objOrder->id_lang)) { + $objBookingDetail->selling_object_name = $roomTypeInfo['selling_object_name']; + $objBookingDetail->selling_object_plural_name = $roomTypeInfo['selling_object_plural_name']; + } + $objBookingDetail->date_from = $objCartBookingData->date_from; $objBookingDetail->date_to = $objCartBookingData->date_to; $objBookingDetail->adults = $objCartBookingData->adults;