diff --git a/controllers/front/OurPropertiesController.php b/controllers/front/OurPropertiesController.php index 3df472859..255714524 100644 --- a/controllers/front/OurPropertiesController.php +++ b/controllers/front/OurPropertiesController.php @@ -129,7 +129,6 @@ class OurPropertiesControllerCore extends FrontController 'hotelsInfo' => $hotelsInfo, 'hotelLocationArray' => $hotelLocationArray, 'displayHotelMap' => $displayHotelMap, - 'WK_HTL_SHORT_DESC' => Configuration::get('WK_HTL_SHORT_DESC', $this->context->language->id), 'currentIndex' => $this->context->link->getPageLink('our-properties') ) ); diff --git a/modules/hotelreservationsystem/classes/HotelHelper.php b/modules/hotelreservationsystem/classes/HotelHelper.php index 324f7c4d8..f1aba02d2 100644 --- a/modules/hotelreservationsystem/classes/HotelHelper.php +++ b/modules/hotelreservationsystem/classes/HotelHelper.php @@ -1126,14 +1126,6 @@ class HotelHelper // lang fields $languages = Language::getLanguages(false); - $htlShortDescLang = array( - 'en' => 'We offer elegant rooms, gourmet dining, and attentive service for a memorable stay.', - 'nl' => 'Wij bieden elegante kamers, gastronomisch dineren en attente service voor een onvergetelijk verblijf.', - 'fr' => 'Nous proposons des chambres élégantes, une cuisine gastronomique et un service attentionné pour un séjour mémorable.', - 'de' => 'Wir bieten elegante Zimmer, Gourmet-Restaurants und aufmerksamen Service für einen unvergesslichen Aufenthalt.', - 'ru' => 'Мы предлагаем элегантные номера, изысканную кухню и внимательное обслуживание для незабываемого отдыха.', - 'es' => 'Ofrecemos habitaciones elegantes, comidas gourmet y un servicio atento para una estadía inolvidable.', - ); $defaultDimensionUnitLang = array( 'en' => 'ft', 'nl' => 'ft', @@ -1142,23 +1134,15 @@ class HotelHelper 'ru' => 'фут', 'es' => 'ft', ); - $WK_HTL_CHAIN_NAME = array(); - $WK_HTL_SHORT_DESC = array(); $defaultDimensionUnit = array(); foreach ($languages as $lang) { - if (isset($htlShortDescLang[$lang['iso_code']])) { - $WK_HTL_SHORT_DESC[$lang['id_lang']] = $htlShortDescLang[$lang['iso_code']]; - $WK_HTL_CHAIN_NAME[$lang['id_lang']] = $homeBannerTitleLang[$lang['iso_code']]; + if (isset($defaultDimensionUnitLang[$lang['iso_code']])) { $defaultDimensionUnit[$lang['id_lang']] = $defaultDimensionUnitLang[$lang['iso_code']]; } else { $defaultDimensionUnit[$lang['id_lang']] = $defaultDimensionUnitLang['en']; - $WK_HTL_CHAIN_NAME[$lang['id_lang']] = $homeBannerTitleLang['en']; - $WK_HTL_SHORT_DESC[$lang['id_lang']] = $htlShortDescLang['en']; } } - Configuration::updateValue('WK_HTL_CHAIN_NAME', $WK_HTL_CHAIN_NAME); - Configuration::updateValue('WK_HTL_SHORT_DESC', $WK_HTL_SHORT_DESC); Configuration::updateValue('WK_DIMENSION_UNIT', $defaultDimensionUnit); // Search Fields diff --git a/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php b/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php index 25b8279bc..1797295e6 100644 --- a/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php +++ b/modules/hotelreservationsystem/controllers/admin/AdminHotelGeneralSettingsController.php @@ -124,39 +124,15 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'generalsetting' => array( 'title' => $this->l('Website Configuration'), 'fields' => array( - 'WK_HTL_CHAIN_NAME' => array( - 'title' => $this->l('Property Brand Name'), - 'type' => 'textLang', - 'lang' => true, - 'required' => true, - 'validation' => 'isGenericName', - 'hint' => $this->l('Enter Property name in case of single property or enter your properties chain name in case of multiple properties.'), - ), - 'WK_HTL_SHORT_DESC' => array( - 'title' => $this->l('Property Short Description'), - 'type' => 'textareaLang', - 'lang' => true, - 'required' => true, - 'rows' => '4', - 'cols' => '2', - 'validation' => 'isGenericName', - 'hint' => $this->l('This will display property short description in footer. Note: number of letters must be less than 220.'), - ), 'WK_PRIMARY_HOTEL' => array( 'title' => $this->l('Primary property'), 'hint' => $this->l('Primary property is used to default address for your business. The property address will be considered as your registered business address.'), 'type' => 'select', 'identifier' => 'id', 'list' => $hotelsInfo, - ), - 'WK_HTL_ESTABLISHMENT_YEAR' => array( - 'title' => $this->l('Website Launch Year'), - 'hint' => $this->l('The year when your hotel site was launched.'), - 'type' => 'text', - 'class' => 'fixed-width-xxl', ), 'WK_DISPLAY_PROPERTIES_LINK_IN_HEADER' => array( - 'title' => $this->l('Display Our Properties link in Header'), + 'title' => $this->l('Display Properties link in Header'), 'cast' => 'intval', 'type' => 'bool', 'default' => '0', @@ -170,7 +146,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'value' => 0, ), ), - 'hint' => $this->l('Display Our Properties link in header in the front office'), + 'hint' => $this->l('Display Properties link in header in the front office'), ), 'WK_DISPLAY_CONTACT_PAGE_HOTEL_LIST' => array( 'title' => $this->l('Display Contact Page Hotel List'), @@ -232,6 +208,12 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'required' => true, 'type' => 'text' ), + 'WK_HTL_ESTABLISHMENT_YEAR' => array( + 'title' => $this->l('Website Launch Year'), + 'hint' => $this->l('The year when your hotel site was launched.'), + 'type' => 'text', + 'class' => 'fixed-width-xxl', + ), 'PS_SHOP_PHONE' => array( 'title' => $this->l('Phone'), 'validation' => 'isGenericName', @@ -423,7 +405,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'hint' => $this->l('If yes, only active hotels will be displayed on map.'), ), 'WK_DISPLAY_PROPERTIES_PAGE_GOOGLE_MAP' => array( - 'title' => $this->l('Display Our Properties page Google map'), + 'title' => $this->l('Display Properties page Google map'), 'cast' => 'intval', 'type' => 'bool', 'default' => '0', @@ -437,7 +419,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController 'value' => 0, ), ), - 'hint' => $this->l('Enable to display map with hotels locations on the our properties page.'), + 'hint' => $this->l('Enable to display map with hotels locations on the properties page.'), ), 'WK_DISPLAY_CONTACT_PAGE_GOOLGE_MAP' => array( 'title' => $this->l('Display Contact Us page Google map'), @@ -540,29 +522,6 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController $this->errors[] = $this->l('Property name search threshold field is invalid.'); } - if (!trim(Tools::getValue('WK_HTL_CHAIN_NAME_'.$defaultLangId))) { - $this->errors[] = $this->l('Property chain name is required at least in ').$objDefaultLanguage['name']; - } else { - foreach ($languages as $lang) { - if (trim(Tools::getValue('WK_HTL_CHAIN_NAME_'.$lang['id_lang']))) { - if (!Validate::isGenericName(Tools::getValue('WK_HTL_CHAIN_NAME_'.$lang['id_lang']))) { - $this->errors[] = $this->l('Invalid property chain name in ').$lang['name']; - } - } - } - } - if (!trim(Tools::getValue('WK_HTL_SHORT_DESC_'.$defaultLangId))) { - $this->errors[] = $this->l('Property short description is required at least in '). - $objDefaultLanguage['name']; - } else { - foreach ($languages as $lang) { - if (trim(Tools::getValue('WK_HTL_SHORT_DESC_'.$lang['id_lang']))) { - if (!Validate::isGenericName(Tools::getValue('WK_HTL_SHORT_DESC_'.$lang['id_lang']))) { - $this->errors[] = $this->l('Invalid property short description in ').$lang['name']; - } - } - } - } if (!Validate::isUnsignedInt(Tools::getValue('WK_ADVANCED_PAYMENT_GLOBAL_MIN_AMOUNT'))) { $this->errors[] = $this->l('Invalid minimum partial payment percentage.'); } elseif (Tools::getValue('WK_ADVANCED_PAYMENT_GLOBAL_MIN_AMOUNT') <= 0) { @@ -604,20 +563,6 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController $_POST['WK_HOTEL_NAME_ENABLE'] = 1; } } - foreach ($languages as $lang) { - // if lang fileds are at least in default language and not available in other languages then - // set empty fields value to default language value - if (!trim(Tools::getValue('WK_HTL_CHAIN_NAME_'.$lang['id_lang']))) { - $_POST['WK_HTL_CHAIN_NAME_'.$lang['id_lang']] = trim( - Tools::getValue('WK_HTL_CHAIN_NAME_'.$defaultLangId) - ); - } - if (!trim(Tools::getValue('WK_HTL_SHORT_DESC_'.$lang['id_lang']))) { - $_POST['WK_HTL_SHORT_DESC_'.$lang['id_lang']] = trim( - Tools::getValue('WK_HTL_SHORT_DESC_'.$defaultLangId) - ); - } - } parent::postProcess(); if (empty($this->errors)) { Tools::redirectAdmin(self::$currentIndex.'&conf=6&token='.$this->token); diff --git a/modules/hotelreservationsystem/hotelreservationsystem.php b/modules/hotelreservationsystem/hotelreservationsystem.php index ad105af85..c9a8521e3 100644 --- a/modules/hotelreservationsystem/hotelreservationsystem.php +++ b/modules/hotelreservationsystem/hotelreservationsystem.php @@ -48,7 +48,6 @@ class HotelReservationSystem extends Module $resources = array( 'hotels' => array('description' => 'Hotel Branch Information','class' => 'HotelBranchInformation'), 'hotel_room_types' => array('description' => 'Hotel room types','class' => 'HotelRoomType'), - 'property_types' => array('description' => 'Hotel property types', 'class' => 'HotelPropertyType'), 'hotel_amenities' => array('description' => 'The hotel amenities', 'class' => 'HotelAmenities'), 'hotel_refund_rules' => array('description' => 'The hotel refund rules','class' => 'HotelOrderRefundRules'), 'hotel_rooms' => array('description' => 'The hotel rooms','class' => 'HotelRoomInformation'), @@ -358,7 +357,7 @@ class HotelReservationSystem extends Module $this->context->smarty->assign( array( 'WK_HTL_ESTABLISHMENT_YEAR' => Configuration::get('WK_HTL_ESTABLISHMENT_YEAR'), - 'WK_HTL_CHAIN_NAME' => Configuration::get('WK_HTL_CHAIN_NAME', $this->context->language->id), + 'WK_HTL_CHAIN_NAME' => Configuration::get('PS_SHOP_NAME'), ) ); return $this->display(__FILE__, 'copyRight.tpl'); @@ -452,12 +451,6 @@ class HotelReservationSystem extends Module //If Admin update new language when we do entry in module all lang tables. HotelHelper::updateLangTables($newIdLang, $langTables); - // update configuration keys - $configKeys = array( - 'WK_HTL_CHAIN_NAME', - 'WK_HTL_SHORT_DESC', - ); - HotelHelper::updateConfigurationLangKeys($newIdLang, $configKeys); } } @@ -600,6 +593,7 @@ class HotelReservationSystem extends Module 'WK_ROOM_LEFT_WARNING_NUMBER', 'WK_HTL_ESTABLISHMENT_YEAR', 'WK_HTL_CHAIN_NAME', + 'WK_HTL_SHORT_DESC', 'WK_HTL_TAG_LINE', 'WK_TITLE_HEADER_BLOCK', 'WK_CONTENT_HEADER_BLOCK', diff --git a/modules/hotelreservationsystem/views/templates/hook/copyRight.tpl b/modules/hotelreservationsystem/views/templates/hook/copyRight.tpl index eb3541799..d8380154f 100644 --- a/modules/hotelreservationsystem/views/templates/hook/copyRight.tpl +++ b/modules/hotelreservationsystem/views/templates/hook/copyRight.tpl @@ -1,5 +1,5 @@
- ©{if isset($WK_HTL_ESTABLISHMENT_YEAR) && $WK_HTL_ESTABLISHMENT_YEAR} {$WK_HTL_ESTABLISHMENT_YEAR}-{'Y'|date} {/if} {$WK_HTL_CHAIN_NAME}. {l s=' All rights reserved. | Powered by' mod='hotelreservationsystem'} QloApps + ©{if isset($WK_HTL_ESTABLISHMENT_YEAR) && $WK_HTL_ESTABLISHMENT_YEAR} {$WK_HTL_ESTABLISHMENT_YEAR}-{'Y'|date} {/if} {$WK_HTL_CHAIN_NAME|escape:'html':'UTF-8'}. {l s=' All rights reserved. | Powered by' mod='hotelreservationsystem'} QloApps
{$WK_HTL_SHORT_DESC|escape:'html':'UTF-8'}
+{l s='Enjoy a welcoming atmosphere, essential comforts, and a pleasant stay.'}