From 55bffe414170d04c18c4088501e237c44be36fd5 Mon Sep 17 00:00:00 2001 From: "lakshya.chauhan193" Date: Tue, 28 Feb 2023 12:05:08 +0530 Subject: [PATCH] resolved assigning hotel feature issue --- .../controllers/admin/AdminAssignHotelFeatures.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/modules/hotelreservationsystem/controllers/admin/AdminAssignHotelFeatures.php b/modules/hotelreservationsystem/controllers/admin/AdminAssignHotelFeatures.php index 3530cd844..0397587fe 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminAssignHotelFeatures.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminAssignHotelFeatures.php @@ -40,11 +40,12 @@ class AdminAssignHotelFeaturesController extends ModuleAdminController $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'htl_branch_info` hi ON (hi.`id` = a.`id_hotel`)'; $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'htl_branch_info_lang` hil ON (hi.`id` = hil.`id` AND hil.id_lang = '.(int)$this->context->language->id.')'; - $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'state` s ON (s.`id_state` = hi.`state_id`)'; - $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (cl.`id_country` = hi.`country_id` + $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'address` addr ON (addr.`id_hotel` = hi.`id`)'; + $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'state` s ON (s.`id_state` = addr.`id_state`)'; + $this->_join .= 'LEFT JOIN `'._DB_PREFIX_.'country_lang` cl ON (cl.`id_country` = addr.`id_country` AND cl.`id_lang` = '.(int)$this->context->language->id.')'; - $this->_select .= 'hi.`city` as htl_city, hi.`id` as htl_id, hil.`hotel_name` as htl_name, + $this->_select .= 'addr.`city` as htl_city, hi.`id` as htl_id, hil.`hotel_name` as htl_name, s.`name` as `state_name`, cl.`name`'; $this->_group = 'GROUP BY a.`id_hotel`'; @@ -225,4 +226,4 @@ class AdminAssignHotelFeaturesController extends ModuleAdminController $this->addJs(_MODULE_DIR_.'hotelreservationsystem/views/js/HotelReservationAdmin.js'); $this->addCSS(_MODULE_DIR_.'hotelreservationsystem/views/css/HotelReservationAdmin.css'); } -} +} \ No newline at end of file