Fixed: removed brandname and short description from general setting
This commit is contained in:
@@ -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')
|
||||
)
|
||||
);
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<div class="copyRightWrapper">
|
||||
<p class="copyRight">
|
||||
©{if isset($WK_HTL_ESTABLISHMENT_YEAR) && $WK_HTL_ESTABLISHMENT_YEAR} {$WK_HTL_ESTABLISHMENT_YEAR}-{'Y'|date} {/if}<a href="{$base_dir}"> {$WK_HTL_CHAIN_NAME}</a>. {l s=' All rights reserved. | Powered by' mod='hotelreservationsystem'} <a href="https://qloapps.com/" target="_blank">QloApps</a>
|
||||
©{if isset($WK_HTL_ESTABLISHMENT_YEAR) && $WK_HTL_ESTABLISHMENT_YEAR} {$WK_HTL_ESTABLISHMENT_YEAR}-{'Y'|date} {/if}<a href="{$base_dir}"> {$WK_HTL_CHAIN_NAME|escape:'html':'UTF-8'}</a>. {l s=' All rights reserved. | Powered by' mod='hotelreservationsystem'} <a href="https://qloapps.com/" target="_blank">QloApps</a>
|
||||
</p>
|
||||
</div>
|
||||
@@ -21,13 +21,13 @@
|
||||
*}
|
||||
|
||||
{block name='our_properties'}
|
||||
{capture name=path}{l s='Our Properties'}{/capture}
|
||||
{capture name=path}{l s='Properties'}{/capture}
|
||||
{if isset($hotelsInfo) && $hotelsInfo}
|
||||
{block name='our_properties_list_title'}
|
||||
<div class="title-container">
|
||||
<h1 class="text-center our-properties-header">{l s='Our Properties'}</h1>
|
||||
<h1 class="text-center our-properties-header">{l s='Properties'}</h1>
|
||||
<div class="text-center our-properties-desc">
|
||||
<p>{$WK_HTL_SHORT_DESC|escape:'html':'UTF-8'}</p>
|
||||
<p>{l s='Enjoy a welcoming atmosphere, essential comforts, and a pleasant stay.'}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
Reference in New Issue
Block a user