Skip to content

Commit

Permalink
Merge pull request #409 from abhishek-webkul/gli-340
Browse files Browse the repository at this point in the history
Change Feature Price name to Advanced Price Rule
  • Loading branch information
rohit053 authored Oct 12, 2022
2 parents 6d20cfe + cf408d5 commit ed6cb3d
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 32 deletions.
10 changes: 5 additions & 5 deletions admin/themes/default/template/controllers/products/prices.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -383,17 +383,17 @@ $(document).ready(function () {
</div>

<div class="panel">
<h3>{l s='Feature Price Plans'}</h3>
<h3>{l s='Advanced Price Rules'}</h3>
<div class="alert alert-info">
{l s='You can set feature price plans by visiting '}
<a target="_blank" href="{$link->getAdminLink('AdminHotelFeaturePricesSettings')}">{l s='create feature price plans'}</a>
{l s='You can set advanced price rules by visiting '}
<a target="_blank" href="{$link->getAdminLink('AdminHotelFeaturePricesSettings')}">{l s='create advanced price rules.'}</a>
</div>
<div class="table-responsive">
<table class="table table-bordered">
<thead>
<tr>
<th>#{l s='Id'}</th>
<th>{l s='Plan Name'}</th>
<th>{l s='Rule Name'}</th>
<th>{l s='Impact way'}</th>
<th>{l s='Impact Type'}</th>
<th>{l s='Impact Value'}</th>
Expand Down Expand Up @@ -455,7 +455,7 @@ $(document).ready(function () {
{else}
<tr>
<td class="text-center" colspan="6">
<i class="icon-warning-sign"></i> {l s='No feature price plans.'}
<i class="icon-warning-sign"></i> {l s='No advanced price rules.'}
</td>
</tr>
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public function __construct()
'align' => 'center',
),
'ftr_price_name' => array(
'title' => $this->l('Feature Name'),
'title' => $this->l('Rule Name'),
'align' => 'center',
'havingFilter' => true,
),
Expand Down Expand Up @@ -155,7 +155,7 @@ public function initToolbar()
parent::initToolbar();
$this->page_header_toolbar_btn['new'] = array(
'href' => self::$currentIndex.'&add'.$this->table.'&token='.$this->token,
'desc' => $this->l('Add Feature Price'),
'desc' => $this->l('Add new rule'),
'imgclass' => 'new'
);
}
Expand Down Expand Up @@ -220,10 +220,10 @@ public function postProcess()
if (Configuration::updateValue('HTL_FEATURE_PRICING_PRIORITY', $priorityConfig)) {
Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
} else {
$this->errors[] = $this->l('Some error occurred while updating feature price priorities.');
$this->errors[] = $this->l('Some error occurred while updating advanced price rule priorities.');
}
} else {
$this->errors[] = $this->l('Duplicate values selected for feature price priorities.');
$this->errors[] = $this->l('Duplicate values selected for advanced price rule priorities.');
}
} else {
parent::postProcess();
Expand Down Expand Up @@ -289,15 +289,15 @@ public function processSave()
}

if ($isPlanTypeExists) {
$this->errors[] = $this->l('A feature price rule already exists in which some dates are common with this
$this->errors[] = $this->l('An advanced price rule already exists in which some dates are common with this
plan. Please select a different date range.');
} else {
if (!$roomTypeId) {
$this->errors[] = $this->l('Room is not selected. Please try again.');
}
if (!Tools::getValue('feature_price_name_'.$defaultLangId)) {
$this->errors[] = sprintf(
$this->l('Feature price rule name is required at least in %s'),
$this->l('Advanced price rule name is required at least in %s'),
$objDefaultLang->name
);
}
Expand All @@ -307,21 +307,21 @@ public function processSave()
);
foreach ($languages as $language) {
if (!Validate::isCatalogName(Tools::getValue('feature_price_name_'.$language['id_lang']))) {
$this->errors[] = $this->l('Feature price name is invalid in ').$language['name'];
$this->errors[] = $this->l('Advanced price rule name is invalid in ').$language['name'];
} elseif (Tools::strlen(Tools::getValue('feature_price_name_'.$language['id_lang'])) > $validateRules['sizeLang']['feature_price_name']) {
sprintf(
$this->l('Feature price Name field is too long (%2$d chars max).'),
$this->l('Advanced price rule Name field is too long (%2$d chars max).'),
$validateRules['sizeLang']['feature_price_name']
);
}
}

if ($dateSelectionType == 1) {
if ($dateFrom == '') {
$this->errors[] = $this->l('Please choose Date from for the feature price.');
$this->errors[] = $this->l('Please choose Date from for the advanced price rule.');
}
if ($dateTo == '') {
$this->errors[] = $this->l('Please choose Date to for the feature price.');
$this->errors[] = $this->l('Please choose Date to for the advanced price rule.');
}
$dateFrom = date('Y-m-d', strtotime($dateFrom));
$dateTo = date('Y-m-d', strtotime($dateTo));
Expand All @@ -345,7 +345,7 @@ public function processSave()
}
} else {
if ($specificDate == '') {
$this->errors[] = $this->l('Please choose Date from for the feature price.');
$this->errors[] = $this->l('Please choose Date from for the advanced price rule.');
}
$specificDate = date('Y-m-d', strtotime($specificDate));
if (!Validate::isDate($specificDate)) {
Expand Down Expand Up @@ -406,7 +406,7 @@ public function processSave()
Tools::redirectAdmin(self::$currentIndex.'&conf=4&token='.$this->token);
}
} else {
$this->errors[] = $this->l('Some error occured while saving feature price rule.');
$this->errors[] = $this->l('Some error occured while saving advanced price rule.');
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions modules/hotelreservationsystem/hotelreservationsystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -426,10 +426,10 @@ public function callInstallTab()
'AdminHotelReservationSystemManagement'
);

//Controllers which are to be used in this modules but we have not to create tab for those ontrollers...
// Controllers without tabs
$this->installTab('AdminOrderRestrictSettings', 'Order Restrict Configuration', false, false);
$this->installTab('AdminHotelGeneralSettings', 'Hotel General configuration', false, false);
$this->installTab('AdminHotelFeaturePricesSettings', 'Feature Pricing Configuration', false, false);
$this->installTab('AdminHotelFeaturePricesSettings', 'Advanced Price Rules', false, false);
$this->installTab('AdminRoomTypeGlobalDemand', 'Additional Demand Configuration', false, false);
$this->installTab('AdminAssignHotelFeatures', 'Assign Hotel Features', false, false);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@
<div class="btn-group setting-link-div col-sm-3 col-xs-12">
<a type="button" href="{$feature_price_setting_link}" class="setting-link btn btn-default col-sm-10 col-xs-10">
<span class="col-sm-2 col-xs-2"><i class="icon-cog"></i></span>
<span class="setting-title col-sm-10 col-xs-10">{l s='Feature Price' mod='hotelreservationsystem'}</span>
<span class="setting-title col-sm-10 col-xs-10">{l s='Advanced Price Rules' mod='hotelreservationsystem'}</span>
</a>
<a tabindex="0" class="btn btn-default col-sm-2 col-xs-2" role="button" data-toggle="popover" data-trigger="focus" title="{l s='Feature Prices Settings' mod='hotelreservationsystem'}" data-content="{l s='Here set specific prices for specific dates.' mod='hotelreservationsystem'}" data-placement="bottom">
<a tabindex="0" class="btn btn-default col-sm-2 col-xs-2" role="button" data-toggle="popover" data-trigger="focus" title="{l s='Advanced Price Rule Settings' mod='hotelreservationsystem'}" data-content="{l s='Here set advanced price rules for specific dates.' mod='hotelreservationsystem'}" data-placement="bottom">
<i class="icon-question-circle"></i>
</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
<div class="panel">
<div class="panel-heading">
{if isset($edit)}
<i class='icon-pencil'></i>&nbsp{l s='Edit Feature Price Rule' mod='hotelreservationsystem'}
<i class='icon-pencil'></i>&nbsp{l s='Edit Advanced Price Rule' mod='hotelreservationsystem'}
{else}
<i class='icon-plus'></i>&nbsp{l s='Add New Feature Price Rule' mod='hotelreservationsystem'}
<i class='icon-plus'></i>&nbsp{l s='Add New Advanced Price Rule' mod='hotelreservationsystem'}
{/if}
</div>
<form id="{$table}_form" class="defaultForm form-horizontal" action="{$current}&{if !empty($submit_action)}{$submit_action}{/if}&token={$token}" method="post" enctype="multipart/form-data" {if isset($style)}style="{$style}"{/if}>
Expand All @@ -34,25 +34,25 @@
{l s='Room Type :' mod='hotelreservationsystem'}
</label>
<div class="col-sm-3">
<input autocomplete="off" type="text" id="room_type_name" name="room_type_name" class="form-control" placeholder= "{l s='Enter Room Type Name' mod='hotelreservationsystem'}" value="{if isset($productName)}{$productName}{/if}"/>
<input autocomplete="off" type="text" id="room_type_name" name="room_type_name" class="form-control" placeholder= "{l s='Enter room type name' mod='hotelreservationsystem'}" value="{if isset($productName)}{$productName}{/if}"/>
<input type="hidden" id="room_type_id" name="room_type_id" class="form-control" value="{if isset($objFeaturePrice->id_product)}{$objFeaturePrice->id_product}{else}0{/if}"/>
<div class="dropdown">
<ul class="room_type_search_results_ul"></ul>
</div>
<p class="error-block" style="display:none; color: #CD5D5D;">{l s='No match found for this search. Please try with an existing name.' mod='hotelreservationsystem'}</p>
</div>
<div class="help-block">
**{l s='Enter room type name and select the room for which you are going to create this feature price plan.' mod='hotelreservationsystem'}
**{l s='Enter room type name and select the room for which you are going to create this advanced price rule.' mod='hotelreservationsystem'}
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label required" for="feature_price_name" >
{l s='Feature Price Rule Name :' mod='hotelreservationsystem'}
{l s='Advanced Price Rule Name :' mod='hotelreservationsystem'}
</label>
<div class="col-lg-3">
{foreach from=$languages item=language}
{assign var="feature_price_name" value="feature_price_name_`$language.id_lang`"}
<input type="text" id="{$feature_price_name}" name="{$feature_price_name}" value="{if isset($objFeaturePrice->feature_price_name[$language.id_lang]) && $objFeaturePrice->feature_price_name[$language.id_lang]}{$objFeaturePrice->feature_price_name[$language.id_lang]}{else if isset($smarty.post.$feature_price_name)}{$smarty.post.$feature_price_name}{/if}" data-lang-name="{$language.name}" placeholder="{l s='Enter Feature Price Rule Name' mod='hotelreservationsystem'}" class="form-control feature_price_name_all" {if $currentLang.id_lang != $language.id_lang}style="display:none;"{/if}/>
<input type="text" id="{$feature_price_name}" name="{$feature_price_name}" value="{if isset($objFeaturePrice->feature_price_name[$language.id_lang]) && $objFeaturePrice->feature_price_name[$language.id_lang]}{$objFeaturePrice->feature_price_name[$language.id_lang]}{else if isset($smarty.post.$feature_price_name)}{$smarty.post.$feature_price_name}{/if}" data-lang-name="{$language.name}" placeholder="{l s='Enter advanced price rule name' mod='hotelreservationsystem'}" class="form-control feature_price_name_all" {if $currentLang.id_lang != $language.id_lang}style="display:none;"{/if}/>
{/foreach}
</div>
{if $languages|@count > 1}
Expand Down Expand Up @@ -115,7 +115,7 @@
</div>
<div class="form-group special_days_content" {if isset($objFeaturePrice->date_selection_type) && $objFeaturePrice->date_selection_type == 2}style="display:none;"{/if}>
<label class="control-label col-lg-3">
<span class="label-tooltip" data-toggle="tooltip" data-html="true" title="" data-original-title="{l s='If you want to create this Feature price rule only for some special days of the week of selected date range then you can select select days after checking this option. Otherwise rule will be created for whole selected date range.' mod='hotelreservationsystem'}">
<span class="label-tooltip" data-toggle="tooltip" data-html="true" title="" data-original-title="{l s='If you want to create this Advanced price rule only for some special days of the week of selected date range then you can select select days after checking this option. Otherwise rule will be created for whole selected date range.' mod='hotelreservationsystem'}">
{l s='For Special Days' mod='hotelreservationsystem'}
</span>
</label>
Expand Down Expand Up @@ -242,7 +242,7 @@
<div class="form-group">
<label class="control-label col-lg-3">
<span>
{l s='Enable Feature Price Rule' mod='hotelreservationsystem'}
{l s='Enable Advanced Price Rule' mod='hotelreservationsystem'}
</span>
</label>
<div class="col-lg-9 ">
Expand All @@ -259,7 +259,7 @@
{* select group accesses *}
<div class="form-group">
<label class="control-label col-lg-3">
<span class="label-tooltip" data-toggle="tooltip" data-html="true" data-original-title="{l s='Select all the groups that you would like to apply to this feature price.' mod='hotelreservationsystem'}">{l s='Group access' mod='hotelreservationsystem'}</span>
<span class="label-tooltip" data-toggle="tooltip" data-html="true" data-original-title="{l s='Select all the groups that you would like to apply to this advanced price rule.' mod='hotelreservationsystem'}">{l s='Group access' mod='hotelreservationsystem'}</span>
</label>
<div class="col-lg-6">
<div class="table-responsive">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<div class="panel">
<h3>{l s='Priority management' mod='hotelreservationsystem'}</h3>
<div class="alert alert-info">
{l s='Sometimes one customer can fit into multiple Feature price rules. In this case priorities allow you to define which rule applies to the Room Type.' mod='hotelreservationsystem'}
{l s='Sometimes one customer can fit into multiple advanced price rules. In this case priorities allow you to define which rule applies to the room type.' mod='hotelreservationsystem'}
</div>
<form id="{$table|escape:'htmlall':'UTF-8'}_form" class="defaultForm form-horizontal" action="{$current|escape:'htmlall':'UTF-8'}&{if !empty($submit_action)}{$submit_action|escape:'htmlall':'UTF-8'}{/if}&token={$token|escape:'htmlall':'UTF-8'}" method="post" enctype="multipart/form-data" {if isset($style)}style="{$style|escape:'htmlall':'UTF-8'}"{/if}>
<div class="form-group">
<label class="control-label col-lg-3" for="featurePricePriority">{l s='Feature Price Calculation Priorities' mod='hotelreservationsystem'} :: </label>
<label class="control-label col-lg-3" for="featurePricePriority">{l s='Advanced Price Calculation Priorities' mod='hotelreservationsystem'} :: </label>
<div class="input-group col-lg-9">
<select name="featurePricePriority[]" class="featurePricePriority">
<option class="specific_date" value="specific_date" {if isset($featurePricePriority) && $featurePricePriority[0]=='specific_date'}selected="selected"{/if}>{l s="Specific Date" mod='hotelreservationsystem'}</option>
Expand Down

0 comments on commit ed6cb3d

Please sign in to comment.