From 8fa8bfc68261cc6b88dffe03e4158d85eb7056cc Mon Sep 17 00:00:00 2001 From: sumit panwar Date: Sat, 30 Jan 2021 17:41:37 +0530 Subject: [PATCH] Fix:: If you assign room type condition on that cart rule, Errors of hotel access if room type is not assigned to any hotel on cart rule page. --- .../classes/HotelBranchInformation.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/hotelreservationsystem/classes/HotelBranchInformation.php b/modules/hotelreservationsystem/classes/HotelBranchInformation.php index c3f413c59..1056deafe 100644 --- a/modules/hotelreservationsystem/classes/HotelBranchInformation.php +++ b/modules/hotelreservationsystem/classes/HotelBranchInformation.php @@ -277,6 +277,12 @@ class HotelBranchInformation extends ObjectModel unset($dataArray[$key]); } } + } else { + if ($addAccessKey) { + $dataArray[$key]['htl_access'] = 0; + } else { + unset($dataArray[$key]); + } } } elseif (isset($row['id_product'])) { $objRoomType = new HotelRoomType(); @@ -291,6 +297,12 @@ class HotelBranchInformation extends ObjectModel unset($dataArray[$key]); } } + } else { + if ($addAccessKey) { + $dataArray[$key]['htl_access'] = 0; + } else { + unset($dataArray[$key]); + } } } }