diff --git a/classes/PaymentModule.php b/classes/PaymentModule.php index fd3c557a1..205b853bb 100644 --- a/classes/PaymentModule.php +++ b/classes/PaymentModule.php @@ -751,7 +751,7 @@ abstract class PaymentModuleCore extends Module $objBookingDetail->email = $objHotelBranch->email; $objBookingDetail->check_in_time = $objHotelBranch->check_in; $objBookingDetail->check_out_time = $objHotelBranch->check_out; - if ($hotelAddress = $objHotelBranch->getAddress($objCartBkData->id_hotel)) { + if ($hotelAddress = $objHotelBranch->getAddress($objCartBookingData->id_hotel)) { $objBookingDetail->city = $hotelAddress['city']; $objBookingDetail->state = $hotelAddress['state']; $objBookingDetail->country = $hotelAddress['country']; diff --git a/modules/hotelreservationsystem/classes/HotelBranchInformation.php b/modules/hotelreservationsystem/classes/HotelBranchInformation.php index 0d5f94312..a96b6d90b 100644 --- a/modules/hotelreservationsystem/classes/HotelBranchInformation.php +++ b/modules/hotelreservationsystem/classes/HotelBranchInformation.php @@ -376,6 +376,10 @@ class HotelBranchInformation extends ObjectModel if (!$id_lang) $id_lang = Context::getContext()->language->id; + if (!$id_hotel) { + return false; + } + $cache_id = 'hotelBranch::getAddress'.(int)$id_hotel.'-'.(int)$id_lang; if (!Cache::isStored($cache_id)) { $sql = 'SELECT a.*, cl.`name` AS country, s.`name` AS state, s.`iso_code` AS state_iso