Skip to content

Commit

Permalink
Merge pull request #91 from rohit053/v1.4.x
Browse files Browse the repository at this point in the history
V1.4.1 released: Hotel wise permissions, order confirmation mail management, Pricing variants in upselling feature
  • Loading branch information
webkul authored Jan 27, 2020
2 parents 4c78b25 + 0d274a6 commit 0946ab9
Show file tree
Hide file tree
Showing 539 changed files with 14,110 additions and 14,832 deletions.
49 changes: 48 additions & 1 deletion CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,50 @@
####################################
# V1.4.1
####################################

## Added Features:

[+] BO : Hotel wise employee permission management is added. now admin can give permission to his employees according to the specific hotel selections

[+] BO : Additional facility : functionality is added at backoffice order creation process also.
[+] BO : Additional facility : Tax can be applied on additional facilities.
[+] 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]
[+] BO : Order Confirmation Email : Now admin can set to whom order confirmation email will be sent from Preferences -> orders tab.
[+] CO : displayNavigationBottomHook hook added "hotelcommerce/modules/blockuserinfo/nav-xs.tpl".

## Improved/changed features:

[*] 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
[*] FO : Address will not be shown to the customer while checkout process. edit link also removed from "Guest Information" section at checkout page.

[*] BO : Option to delete one room in two default created rows in while saving rooms of the room type.
[*] BO : unit price fields removed from backoffice room type creation page.

[*] CO : blocknavigationmenu : Navigaion menu improved. All links are dynamic now.
[*] CO : wkfooterexploreblock module is removed. All functionalities are merged with blocknavigationmenu module.
[*] CO : Orders will be splitted now hotelwise. A new order will be created for each hotel.
[*] CO : Trademark and powered by changed to webkul (from presatshop).
[*] CO : Correct single quotes and double quotes of Class HotelBookingDetail.php
[*] CO : Installed paypal module by prestashop by default while QloApps installation.
[*] CO : Translations are improved.

## Bug/Issues Resolved:

[-] BO : Resolved : Room does not free even after room status set to checkout.
[-] BO : Resolved : Infinite loop on Room type page while loading Booking Information tab.
[-] BO : Resolved : Book now page showing error when current date is last date of the month.
[-] BO : Resolved : Image is not showing while feature update (Catalog->features) and issue while updating feature.

[-] 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".
[-] 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.
[-] CO : Resolved : Order status is 'Payment Error' if payment is done by advance payment with real payment gateways.

[-] FO : Resolved : blockcart and blocknavigationmenu modules swaps randomly at displayTop hook.
[-] FO : Resolved : Disable dates of last room will be saved for all previous rooms while saving rooms of a room type.
[-] FO : Resolved : Rooms are not visible when changing minimum price in filter by price.
[-] 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.


####################################
# V1.4.0
####################################
Expand Down Expand Up @@ -134,7 +181,7 @@

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

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

[-] BO : Resolved :: hotelreservationsystem:: Hotel images not saved while saving hotel details.
[-] BO : Resolved :: hotelreservationsystem - $max_phone_digit is undefined issue resolved on hotel creation form.
Expand Down
2 changes: 1 addition & 1 deletion admin/themes/default/css/admin-theme.css

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions admin/themes/default/js/admin-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -474,4 +474,9 @@ $(document).ready(function() {

//scroll_if_anchor(window.location.hash);
$("body").on("click", "a.anchor", scroll_if_anchor);

// Unselect the room types when room types with no hotel access are selected.
$('.no-htl-access-option').on('click', function() {
$(this).prop('selected', false);
});
}); //end dom ready
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
*}
<script type="text/javascript">
$(document).ready(function() {
var id_tab_parentmodule = {$id_tab_parentmodule|intval};
var id_tab_module = {$id_tab_module|intval};
$('tr.child-'+id_tab_parentmodule+' > td > input.view.'+id_tab_module).change( function () {
if (!$(this).prop('checked'))
Expand All @@ -37,7 +37,7 @@
$('#table_module_2 thead th:eq(1) input').trigger('click');
}
});
$('tr.child-'+id_tab_parentmodule+' > td > input.edit.'+id_tab_module).change( function () {
if (!$(this).prop('checked'))
Expand All @@ -47,7 +47,7 @@
$('#table_module_2 thead th:eq(2) input').trigger('click');
}
});
$('div.productTabs').find('a').each(function() {
$(this).attr('href', '#');
});
Expand Down Expand Up @@ -187,6 +187,49 @@
});
});
// Change Accesses of hotels
$(".changeHotelAccess").change(function(){
var tout = $(this).data('rel').split('||');
var id_hotel = tout[0];
var id_profile = tout[2];
var enabled = $(this).is(':checked') ? 1 : 0;
var enabled_attr = $(this).is(':checked') ? true : false;
var table = 'table#table_hotel_'+id_profile;
if (id_hotel == -1) {
$(table+' .ajax-htl-all').attr("checked", enabled_attr);
}
$.ajax({
url: "{$link->getAdminLink('AdminAccess')|addslashes}",
cache: false,
data : {
ajaxMode: '1',
id_hotel: id_hotel,
enabled: enabled,
id_profile: id_profile,
submitAddHotelAccess: '1',
action: 'updateHotelAccess',
ajax: '1',
token: '{getAdminToken tab='AdminAccess'}'
},
success : function(res,textStatus,jqXHR)
{
try {
if (res == 'ok') {
showSuccessMessage("{l s='Update successful'}");
} else {
showErrorMessage("{l s='Update error'}");
}
}
catch(e)
{
jAlert('Technical error');
}
}
});
});
});
</script>
{if $show_toolbar}
Expand All @@ -213,9 +256,42 @@
{/foreach}
{foreach $profiles as $profile}
<div class="profile-{$profile.id_profile} tab-profile" style="display:{if $profile.id_profile != $current_profile}none{/if}">
<div class="row">
<div class="row">
{if $profile.id_profile != $admin_profile}
<div class="col-lg-6">
<div class="col-lg-6">
{if isset($hotels) && $hotels}
<div class="panel">
<h3>{l s='Hotel Permissions'}</h3>
<table class="table" id="table_hotel_{$profile.id_profile}">
<thead>
<tr>
<th>{l s='Hotel'}</th>
<th>
<input type="checkbox"{if $access_edit == 1} class="changeHotelAccess" data-rel="-1||all||{$profile.id_profile}"{else} disabled="disabled"{/if}/>
{l s='All'}
</th>
</tr>
</thead>
<tbody>
{if !count($hotels)}
<tr>
<td colspan="6">{l s='No menu'}</td>
</tr>
{else}
{foreach $hotels as $hotelInfo}
{assign var=result_accesses value=0}
<tr class="parentTr">
<td>{$hotelInfo['hotel_name']|escape:'html':'UTF-8'}</td>
<td>
<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}/>
</td>
</tr>
{/foreach}
{/if}
</tbody>
</table>
</div>
{/if}
<div class="panel">
<h3>{l s='Menu'}</h3>
<table class="table" id="table_{$profile.id_profile}">
Expand Down Expand Up @@ -255,8 +331,8 @@
{if !$tab.id_parent OR $tab.id_parent == -1}
{assign var=is_child value=false}
{assign var=result_accesses value=0}
<tr{if !$is_child} class="parent"{/if}>
<td{if !$is_child} class="bold"{/if}>{if $is_child} &raquo; {/if}<strong>{$tab.name}</strong></td>
<tr {if !$is_child} class="parent"{/if}>
<td {if !$is_child} class="bold"{/if}>{if $is_child} &raquo; {/if}<strong>{$tab.name}</strong></td>
{foreach $perms as $perm}
{if $access_edit == 1}
<td>
Expand Down
50 changes: 48 additions & 2 deletions admin/themes/default/template/controllers/cart_rules/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,60 @@ function toggleCartRuleFilter(id)

function removeCartRuleOption(item)
{
var error = 0;
var id = $(item).attr('id').replace('_remove', '');
$('#' + id + '_2 option:selected').remove().appendTo('#' + id + '_1');
var selectedOpt = $('#' + id + '_2 option:selected');
var notAlloedRooms = [];
// validate if rooms with no hotel access are selected
$.each( selectedOpt, function( key, val ) {
if ($(this).attr('data-htl_access') == 0) {
notAlloedRooms.push($(this).text());
error = 1;
}
});
if (error == 0) {
selectedOpt.remove().appendTo('#' + id + '_1');;
} else {
var errorHtml = '';
errorHtml += room_access_err;
if (notAlloedRooms.length) {
errorHtml += '<br />' + room_rmv_txt + '<ul>';
$.each( notAlloedRooms, function( key, val ) {
errorHtml += '<li>' + val + '</li>';
});
errorHtml += '</ul>';
}
showErrorMessage(errorHtml);
}
}

function addCartRuleOption(item)
{
var error = 0;
var id = $(item).attr('id').replace('_add', '');
$('#' + id + '_1 option:selected').remove().appendTo('#' + id + '_2');
var selectedOpt = $('#' + id + '_1 option:selected');
var notAlloedRooms = [];
// validate if rooms with no hotel access are selected
$.each( selectedOpt, function( key, val ) {
if ($(this).attr('data-htl_access') == 0) {
notAlloedRooms.push($(this).text());
error = 1;
}
});
if (error == 0) {
selectedOpt.remove().appendTo('#' + id + '_2');
} else {
var errorHtml = '';
errorHtml += room_access_err;
if (notAlloedRooms.length) {
errorHtml += '<br />' + room_rmv_txt + '<ul>';
$.each( notAlloedRooms, function( key, val ) {
errorHtml += '<li>' + val + '</li>';
});
errorHtml += '</ul>';
}
showErrorMessage(errorHtml);
}
}

function updateProductRuleShortDescription(item)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
var timeText = '{l s='Time' js=1}';
var hourText = '{l s='Hour' js=1}';
var minuteText = '{l s='Minute' js=1}';
var languages = new Array();
{foreach from=$languages item=language key=k}
languages[{$k}] = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,42 @@
<div class="col-lg-12 bootstrap">
<div class="col-lg-6">
<div class="col-lg-6 select-options-div">
{l s='Unselected'}
<select multiple size="10" id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_1">
{foreach from=$product_rule_itemlist.unselected item='item'}
<option value="{$item.id|intval}" title="{$item.name}">&nbsp;{$item.name}</option>
<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>
{/foreach}
</select>
<div class="clearfix">&nbsp;</div>
<a id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add" class="btn btn-default btn-block" >
<a id="product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add" class="btn btn-default btn-block add-select-options" >
{l s='Add'}
<i class="icon-arrow-right"></i>
</a>
</div>
<div class="col-lg-6">
<div class="col-lg-6 select-options-div">
{l s='Selected'}
<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" >
{foreach from=$product_rule_itemlist.selected item='item'}
<option value="{$item.id|intval}" title="{$item.name}">&nbsp;{$item.name}</option>
<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>
{/foreach}
</select>
<div class="clearfix">&nbsp;</div>
<a id="product_rule_select_{$product_rule_group_id}_{$product_rule_id}_remove" class="btn btn-default btn-block" >
<a id="product_rule_select_{$product_rule_group_id}_{$product_rule_id}_remove" class="btn btn-default btn-block add-select-options" >
<i class="icon-arrow-left"></i>
{l s='Remove'}
</a>
</div>
</div>

<script type="text/javascript">
$('#product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_remove').click(function() { removeCartRuleOption(this); updateProductRuleShortDescription(this); });
$('#product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add').click(function() { addCartRuleOption(this); updateProductRuleShortDescription(this); });
$(document).ready(function() { updateProductRuleShortDescription($('#product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add')); });
$('#product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_remove').click(function() {
removeCartRuleOption(this);
updateProductRuleShortDescription(this);
});
$('#product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add').click(function() {
addCartRuleOption(this);
updateProductRuleShortDescription(this);
});
$(document).ready(function() {
updateProductRuleShortDescription($('#product_rule_select_{$product_rule_group_id|intval}_{$product_rule_id|intval}_add'));
});
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@
{hook h="displayAdminLogin"}
<div id="login-footer">
<p class="text-center text-muted">
<a href="https://webkul.com/" onclick="return !window.open(this.href);">
<a href="https://webkul.com" onclick="return !window.open(this.href);">
&copy; Webkul&#8482; 2015-{$smarty.now|date_format:"%Y"} - All rights reserved
</a>
</p>
Expand Down
Loading

0 comments on commit 0946ab9

Please sign in to comment.