Skip to content

Commit 0d274a6

Browse files
committed
V1.4.1 released: Hotel wise permissions, order confirmation mail management, Pricing variants in upselling feature
1 parent cc66435 commit 0d274a6

File tree

542 files changed

+14158
-14865
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

542 files changed

+14158
-14865
lines changed

CHANGELOG.txt

Lines changed: 48 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,50 @@
1+
####################################
2+
# V1.4.1
3+
####################################
4+
5+
## Added Features:
6+
7+
[+] BO : Hotel wise employee permission management is added. now admin can give permission to his employees according to the specific hotel selections
8+
9+
[+] BO : Additional facility : functionality is added at backoffice order creation process also.
10+
[+] BO : Additional facility : Tax can be applied on additional facilities.
11+
[+] BO : Additional facility : Per day price calculation option is added.[Price will be calculated on per day basis of the booking or for entire date range of the booking]
12+
[+] BO : Order Confirmation Email : Now admin can set to whom order confirmation email will be sent from Preferences -> orders tab.
13+
[+] CO : displayNavigationBottomHook hook added "hotelcommerce/modules/blockuserinfo/nav-xs.tpl".
14+
15+
## Improved/changed features:
16+
17+
[*] FO : Address details on Order details page is changed. Only details (name, email and mobile number) will be shown which we are showing to the customer at checkout page
18+
[*] FO : Address will not be shown to the customer while checkout process. edit link also removed from "Guest Information" section at checkout page.
19+
20+
[*] BO : Option to delete one room in two default created rows in while saving rooms of the room type.
21+
[*] BO : unit price fields removed from backoffice room type creation page.
22+
23+
[*] CO : blocknavigationmenu : Navigaion menu improved. All links are dynamic now.
24+
[*] CO : wkfooterexploreblock module is removed. All functionalities are merged with blocknavigationmenu module.
25+
[*] CO : Orders will be splitted now hotelwise. A new order will be created for each hotel.
26+
[*] CO : Trademark and powered by changed to webkul (from presatshop).
27+
[*] CO : Correct single quotes and double quotes of Class HotelBookingDetail.php
28+
[*] CO : Installed paypal module by prestashop by default while QloApps installation.
29+
[*] CO : Translations are improved.
30+
31+
## Bug/Issues Resolved:
32+
33+
[-] BO : Resolved : Room does not free even after room status set to checkout.
34+
[-] BO : Resolved : Infinite loop on Room type page while loading Booking Information tab.
35+
[-] BO : Resolved : Book now page showing error when current date is last date of the month.
36+
[-] BO : Resolved : Image is not showing while feature update (Catalog->features) and issue while updating feature.
37+
38+
[-] CO : Resolved : As theme name was "hotel-theme". So on saving theme translations a new theme directory "hotel-theme" is created and translations are saved in this directory. now "hotel-theme" is replaced with "hotel-reservation-theme".
39+
[-] CO : Resolved : Feature price plans not working. [ Create two plans one for sunday and other for saturday. At the moment it's only showing the change/increase on Saturdays not Sundays. If I unable Saturdays it is showing the price change on Sundays and not Saturdays.
40+
[-] CO : Resolved : Order status is 'Payment Error' if payment is done by advance payment with real payment gateways.
41+
42+
[-] FO : Resolved : blockcart and blocknavigationmenu modules swaps randomly at displayTop hook.
43+
[-] FO : Resolved : Disable dates of last room will be saved for all previous rooms while saving rooms of a room type.
44+
[-] FO : Resolved : Rooms are not visible when changing minimum price in filter by price.
45+
[-] FO : Resolved : Null quantity issue when check-in date and check-out dates are the same. When the date_from and the date_to passed in the URL parameter are identical they are accepted in the entries (Check-In Date & Check-out Date) on the room type detail page. Once we click on Book now pop up with "Null quantity" message appears.
46+
47+
148
####################################
249
# V1.4.0
350
####################################
@@ -134,7 +181,7 @@
134181

135182
[-] CO : Resolved :: hotelreservationsystem - Parent:: replaced with parent:: in classes/hotelHotelBranchInformation.php which was creating problems in installation.
136183

137-
[-] CO : Resolved :: RecursiveDirectoryIterator::__construct(/var/www/html/themes/hotel-theme/): failed to open dir While installation.
184+
[-] CO : Resolved :: RecursiveDirectoryIterator::__construct(/var/www/html/themes/hotel-reservation-theme/): failed to open dir While installation.
138185

139186
[-] BO : Resolved :: hotelreservationsystem:: Hotel images not saved while saving hotel details.
140187
[-] BO : Resolved :: hotelreservationsystem - $max_phone_digit is undefined issue resolved on hotel creation form.

admin/themes/default/css/admin-theme.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

admin/themes/default/js/admin-theme.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,4 +474,9 @@ $(document).ready(function() {
474474

475475
//scroll_if_anchor(window.location.hash);
476476
$("body").on("click", "a.anchor", scroll_if_anchor);
477+
478+
// Unselect the room types when room types with no hotel access are selected.
479+
$('.no-htl-access-option').on('click', function() {
480+
$(this).prop('selected', false);
481+
});
477482
}); //end dom ready

admin/themes/default/template/controllers/access/helpers/form/form.tpl

Lines changed: 84 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
*}
2525
<script type="text/javascript">
2626
$(document).ready(function() {
27-
27+
2828
var id_tab_parentmodule = {$id_tab_parentmodule|intval};
2929
var id_tab_module = {$id_tab_module|intval};
30-
30+
3131
$('tr.child-'+id_tab_parentmodule+' > td > input.view.'+id_tab_module).change( function () {
3232
3333
if (!$(this).prop('checked'))
@@ -37,7 +37,7 @@
3737
$('#table_module_2 thead th:eq(1) input').trigger('click');
3838
}
3939
});
40-
40+
4141
$('tr.child-'+id_tab_parentmodule+' > td > input.edit.'+id_tab_module).change( function () {
4242
4343
if (!$(this).prop('checked'))
@@ -47,7 +47,7 @@
4747
$('#table_module_2 thead th:eq(2) input').trigger('click');
4848
}
4949
});
50-
50+
5151
$('div.productTabs').find('a').each(function() {
5252
$(this).attr('href', '#');
5353
});
@@ -187,6 +187,49 @@
187187
});
188188
});
189189
190+
// Change Accesses of hotels
191+
$(".changeHotelAccess").change(function(){
192+
var tout = $(this).data('rel').split('||');
193+
var id_hotel = tout[0];
194+
var id_profile = tout[2];
195+
var enabled = $(this).is(':checked') ? 1 : 0;
196+
var enabled_attr = $(this).is(':checked') ? true : false;
197+
var table = 'table#table_hotel_'+id_profile;
198+
199+
if (id_hotel == -1) {
200+
$(table+' .ajax-htl-all').attr("checked", enabled_attr);
201+
}
202+
203+
$.ajax({
204+
url: "{$link->getAdminLink('AdminAccess')|addslashes}",
205+
cache: false,
206+
data : {
207+
ajaxMode: '1',
208+
id_hotel: id_hotel,
209+
enabled: enabled,
210+
id_profile: id_profile,
211+
submitAddHotelAccess: '1',
212+
action: 'updateHotelAccess',
213+
ajax: '1',
214+
token: '{getAdminToken tab='AdminAccess'}'
215+
},
216+
success : function(res,textStatus,jqXHR)
217+
{
218+
try {
219+
if (res == 'ok') {
220+
showSuccessMessage("{l s='Update successful'}");
221+
} else {
222+
showErrorMessage("{l s='Update error'}");
223+
}
224+
}
225+
catch(e)
226+
{
227+
jAlert('Technical error');
228+
}
229+
}
230+
});
231+
});
232+
190233
});
191234
</script>
192235
{if $show_toolbar}
@@ -213,9 +256,42 @@
213256
{/foreach}
214257
{foreach $profiles as $profile}
215258
<div class="profile-{$profile.id_profile} tab-profile" style="display:{if $profile.id_profile != $current_profile}none{/if}">
216-
<div class="row">
259+
<div class="row">
217260
{if $profile.id_profile != $admin_profile}
218-
<div class="col-lg-6">
261+
<div class="col-lg-6">
262+
{if isset($hotels) && $hotels}
263+
<div class="panel">
264+
<h3>{l s='Hotel Permissions'}</h3>
265+
<table class="table" id="table_hotel_{$profile.id_profile}">
266+
<thead>
267+
<tr>
268+
<th>{l s='Hotel'}</th>
269+
<th>
270+
<input type="checkbox"{if $access_edit == 1} class="changeHotelAccess" data-rel="-1||all||{$profile.id_profile}"{else} disabled="disabled"{/if}/>
271+
{l s='All'}
272+
</th>
273+
</tr>
274+
</thead>
275+
<tbody>
276+
{if !count($hotels)}
277+
<tr>
278+
<td colspan="6">{l s='No menu'}</td>
279+
</tr>
280+
{else}
281+
{foreach $hotels as $hotelInfo}
282+
{assign var=result_accesses value=0}
283+
<tr class="parentTr">
284+
<td>{$hotelInfo['hotel_name']|escape:'html':'UTF-8'}</td>
285+
<td>
286+
<input type="checkbox"{if $access_edit == 1} data-rel="{$hotelInfo['id']}||specific||{$profile.id_profile|escape:'html':'UTF-8'}||all" class="changeHotelAccess ajax-htl-all"{else} class="all" disabled="disabled"{/if}{if isset($hotelAccess[$profile.id_profile][$hotelInfo.id]['access']) && $hotelAccess[$profile.id_profile][$hotelInfo.id]['access']} checked="checked"{/if}/>
287+
</td>
288+
</tr>
289+
{/foreach}
290+
{/if}
291+
</tbody>
292+
</table>
293+
</div>
294+
{/if}
219295
<div class="panel">
220296
<h3>{l s='Menu'}</h3>
221297
<table class="table" id="table_{$profile.id_profile}">
@@ -255,8 +331,8 @@
255331
{if !$tab.id_parent OR $tab.id_parent == -1}
256332
{assign var=is_child value=false}
257333
{assign var=result_accesses value=0}
258-
<tr{if !$is_child} class="parent"{/if}>
259-
<td{if !$is_child} class="bold"{/if}>{if $is_child} &raquo; {/if}<strong>{$tab.name}</strong></td>
334+
<tr {if !$is_child} class="parent"{/if}>
335+
<td {if !$is_child} class="bold"{/if}>{if $is_child} &raquo; {/if}<strong>{$tab.name}</strong></td>
260336
{foreach $perms as $perm}
261337
{if $access_edit == 1}
262338
<td>

admin/themes/default/template/controllers/cart_rules/form.js

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,60 @@ function toggleCartRuleFilter(id)
7373

7474
function removeCartRuleOption(item)
7575
{
76+
var error = 0;
7677
var id = $(item).attr('id').replace('_remove', '');
77-
$('#' + id + '_2 option:selected').remove().appendTo('#' + id + '_1');
78+
var selectedOpt = $('#' + id + '_2 option:selected');
79+
var notAlloedRooms = [];
80+
// validate if rooms with no hotel access are selected
81+
$.each( selectedOpt, function( key, val ) {
82+
if ($(this).attr('data-htl_access') == 0) {
83+
notAlloedRooms.push($(this).text());
84+
error = 1;
85+
}
86+
});
87+
if (error == 0) {
88+
selectedOpt.remove().appendTo('#' + id + '_1');;
89+
} else {
90+
var errorHtml = '';
91+
errorHtml += room_access_err;
92+
if (notAlloedRooms.length) {
93+
errorHtml += '<br />' + room_rmv_txt + '<ul>';
94+
$.each( notAlloedRooms, function( key, val ) {
95+
errorHtml += '<li>' + val + '</li>';
96+
});
97+
errorHtml += '</ul>';
98+
}
99+
showErrorMessage(errorHtml);
100+
}
78101
}
79102

80103
function addCartRuleOption(item)
81104
{
105+
var error = 0;
82106
var id = $(item).attr('id').replace('_add', '');
83-
$('#' + id + '_1 option:selected').remove().appendTo('#' + id + '_2');
107+
var selectedOpt = $('#' + id + '_1 option:selected');
108+
var notAlloedRooms = [];
109+
// validate if rooms with no hotel access are selected
110+
$.each( selectedOpt, function( key, val ) {
111+
if ($(this).attr('data-htl_access') == 0) {
112+
notAlloedRooms.push($(this).text());
113+
error = 1;
114+
}
115+
});
116+
if (error == 0) {
117+
selectedOpt.remove().appendTo('#' + id + '_2');
118+
} else {
119+
var errorHtml = '';
120+
errorHtml += room_access_err;
121+
if (notAlloedRooms.length) {
122+
errorHtml += '<br />' + room_rmv_txt + '<ul>';
123+
$.each( notAlloedRooms, function( key, val ) {
124+
errorHtml += '<li>' + val + '</li>';
125+
});
126+
errorHtml += '</ul>';
127+
}
128+
showErrorMessage(errorHtml);
129+
}
84130
}
85131

86132
function updateProductRuleShortDescription(item)

admin/themes/default/template/controllers/cart_rules/form.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
var timeText = '{l s='Time' js=1}';
4242
var hourText = '{l s='Hour' js=1}';
4343
var minuteText = '{l s='Minute' js=1}';
44-
44+
4545
var languages = new Array();
4646
{foreach from=$languages item=language key=k}
4747
languages[{$k}] = {
Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,42 @@
11
<div class="col-lg-12 bootstrap">
2-
<div class="col-lg-6">
2+
<div class="col-lg-6 select-options-div">
33
{l s='Unselected'}
44
<select multiple size="10" id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_1">
55
{foreach from=$product_rule_itemlist.unselected item='item'}
6-
<option value="{$item.id|intval}" title="{$item.name}">&nbsp;{$item.name}</option>
6+
<option {if !$item.htl_access}class="no-htl-access-option"{/if} data-htl_access="{$item.htl_access|intval}" value="{$item.id|intval}" title="{$item.name}">&nbsp;{$item.name}</option>
77
{/foreach}
88
</select>
99
<div class="clearfix">&nbsp;</div>
10-
<a id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add" class="btn btn-default btn-block" >
10+
<a id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add" class="btn btn-default btn-block add-select-options" >
1111
{l s='Add'}
1212
<i class="icon-arrow-right"></i>
1313
</a>
1414
</div>
15-
<div class="col-lg-6">
15+
<div class="col-lg-6 select-options-div">
1616
{l s='Selected'}
1717
<select multiple size="10" name="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}[]" id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_2" class="product_rule_toselect" >
1818
{foreach from=$product_rule_itemlist.selected item='item'}
19-
<option value="{$item.id|intval}" title="{$item.name}">&nbsp;{$item.name}</option>
19+
<option data-htl_access="{$item.htl_access|intval}" {if !$item.htl_access}class="no-htl-access-option"{/if} value="{$item.id|intval}" title="{$item.name}">&nbsp;{$item.name}</option>
2020
{/foreach}
2121
</select>
2222
<div class="clearfix">&nbsp;</div>
23-
<a id="product_rule_select_{$product_rule_group_id}_{$product_rule_id}_remove" class="btn btn-default btn-block" >
23+
<a id="product_rule_select_{$product_rule_group_id}_{$product_rule_id}_remove" class="btn btn-default btn-block add-select-options" >
2424
<i class="icon-arrow-left"></i>
2525
{l s='Remove'}
2626
</a>
2727
</div>
2828
</div>
29-
29+
3030
<script type="text/javascript">
31-
$('#product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_remove').click(function() { removeCartRuleOption(this); updateProductRuleShortDescription(this); });
32-
$('#product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add').click(function() { addCartRuleOption(this); updateProductRuleShortDescription(this); });
33-
$(document).ready(function() { updateProductRuleShortDescription($('#product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add')); });
31+
$('#product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_remove').click(function() {
32+
removeCartRuleOption(this);
33+
updateProductRuleShortDescription(this);
34+
});
35+
$('#product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add').click(function() {
36+
addCartRuleOption(this);
37+
updateProductRuleShortDescription(this);
38+
});
39+
$(document).ready(function() {
40+
updateProductRuleShortDescription($('#product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add'));
41+
});
3442
</script>

admin/themes/default/template/controllers/login/content.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
{hook h="displayAdminLogin"}
136136
<div id="login-footer">
137137
<p class="text-center text-muted">
138-
<a href="https://webkul.com/" onclick="return !window.open(this.href);">
138+
<a href="https://webkul.com" onclick="return !window.open(this.href);">
139139
&copy; Webkul&#8482; 2015-{$smarty.now|date_format:"%Y"} - All rights reserved
140140
</a>
141141
</p>

0 commit comments

Comments
 (0)