From 5eeed0e65127d41a0c8d57e588006fef5fe73989 Mon Sep 17 00:00:00 2001 From: Shreesh Arora Date: Fri, 19 Aug 2022 12:35:06 +0530 Subject: [PATCH] resolved contact page map issue --- .../classes/HotelBranchInformation.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/hotelreservationsystem/classes/HotelBranchInformation.php b/modules/hotelreservationsystem/classes/HotelBranchInformation.php index 9a063ef4f..566dd1ce1 100644 --- a/modules/hotelreservationsystem/classes/HotelBranchInformation.php +++ b/modules/hotelreservationsystem/classes/HotelBranchInformation.php @@ -536,13 +536,14 @@ class HotelBranchInformation extends ObjectModel $idLang = $context->language->id; } - $sql = 'SELECT hbl.`hotel_name`, hbi.`phone`, hbi.`email`, hbi.`city`, cl.`name` AS country, hbi.`zipcode`, - hbi.`address`, hbi.`latitude`, hbi.`longitude`, hbi.`map_formated_address`, hbi.`map_input_text` + $sql = 'SELECT hbl.`hotel_name`, a.`phone`, hbi.`email`, a.`city`, cl.`name` AS country, a.`postcode`, + a.`address1` as `address`, hbi.`latitude`, hbi.`longitude`, hbi.`map_formated_address`, hbi.`map_input_text` FROM `'._DB_PREFIX_.'htl_branch_info` AS hbi INNER JOIN `'._DB_PREFIX_.'htl_branch_info_lang` hbl ON (hbl.`id` = hbi.`id` AND hbl.`id_lang` = '.(int)$idLang.') + LEFT JOIN `'._DB_PREFIX_.'address` a ON (a.`id_hotel` = hbi.`id`) INNER JOIN `'._DB_PREFIX_.'country_lang` AS cl - ON (cl.`id_country` = hbi.`country_id` AND cl.`id_lang` = '.(int)$idLang.") + ON (cl.`id_country` = a.`id_country` AND cl.`id_lang` = '.(int)$idLang.") WHERE hbi.`latitude` != 0 AND hbi.`longitude` != 0"; if ($active !== false) {