Merge branch 'develop' into gli-2538
This commit is contained in:
@@ -195,30 +195,31 @@
|
||||
{if isset($room['selected_services']) && $room['selected_services']}
|
||||
{foreach $room['selected_services'] as $service}
|
||||
<div class="row room_demand_block">
|
||||
<div class="col-xs-5">
|
||||
<div class="row">
|
||||
<div class="col-xs-10">
|
||||
<p>{$service['name']|escape:'html':'UTF-8'}</p>
|
||||
{if $service.allow_multiple_quantity}
|
||||
<div class="qty_container">
|
||||
{l s='Quantity:'} {$service.quantity}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col-xs-5">
|
||||
<div class="row">
|
||||
<div class="col-xs-10">
|
||||
<div>{$service['name']|escape:'html':'UTF-8'}</div>
|
||||
{if $service.allow_multiple_quantity}
|
||||
<div class="qty_container">
|
||||
{l s='Quantity:'} {$service.quantity}
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
{if $service['auto_add_to_cart'] && $service['price_addition_type'] == Product::PRICE_ADDITION_TYPE_INDEPENDENT}
|
||||
<span class="badge badge-info label">{l s='Convenience fee'}</span>
|
||||
{/if}
|
||||
{if $service['auto_add_to_cart'] && $service['price_addition_type'] == Product::PRICE_ADDITION_TYPE_WITH_ROOM}
|
||||
<span class="badge badge-info label">{l s='Auto added'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<span class="pull-right">{convertPrice price=$service.total_price}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
{if $service['auto_add_to_cart'] && $service['price_addition_type'] == Product::PRICE_ADDITION_TYPE_INDEPENDENT}
|
||||
<span class="badge badge-info label">{l s='Convenience fee'}</span>
|
||||
{/if}
|
||||
{if $service['auto_add_to_cart'] && $service['price_addition_type'] == Product::PRICE_ADDITION_TYPE_WITH_ROOM}
|
||||
<span class="badge badge-info label">{l s='Auto added'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<span class="pull-right">{convertPrice price=$service.total_price}</span>
|
||||
</div>
|
||||
</div>
|
||||
<p></p>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
@@ -18,82 +18,77 @@
|
||||
*}
|
||||
|
||||
<div class="modal" tabindex="-1" role="dialog" id="rooms_type_extra_demands">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"><i class="icon-remove-sign"></i></button>
|
||||
<h4 class="modal-title"><i class="icon icon-bed"></i> {l s='Room Services'}</h4>
|
||||
</div>
|
||||
<div class="modal-body" id="rooms_extra_demands">
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
{if isset($selectedRoomDemands) && $selectedRoomDemands}
|
||||
<li role="presentation" class="active"><a href="#room_type_demands_desc" aria-controls="facilities" role="tab" data-toggle="tab">{l s='Facilities'}</a></li>
|
||||
{/if}
|
||||
{if isset($roomTypeServiceProducts) && $roomTypeServiceProducts}
|
||||
{if isset($serviceProducts) && $serviceProducts}
|
||||
<li role="presentation" {if !isset($selectedRoomDemands) || !$selectedRoomDemands}class="active"{/if}><a href="#room_type_service_product_desc" aria-controls="services" role="tab" data-toggle="tab">{l s='Services'}</a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="modal-body" id="rooms_extra_demands">
|
||||
<div class="tab-content">
|
||||
{if isset($selectedRoomDemands) && $selectedRoomDemands}
|
||||
<div id="room_type_demands_desc" class="tab-pane active">
|
||||
<div class="rooms_extra_demands_head">
|
||||
<p class="rooms_extra_demands_text">{l s='Add below facilities to the room for better hotel experience'}</p>
|
||||
</div>
|
||||
<div id="room_type_demands_desc">
|
||||
{if isset($selectedRoomDemands) && $selectedRoomDemands}
|
||||
{assign var=roomCount value=1}
|
||||
{foreach $selectedRoomDemands as $key => $roomDemand}
|
||||
<div class="row room_demands_container">
|
||||
<div class="col-sm-12 demand_header">
|
||||
<span>
|
||||
<i class="icon-bed"></i>
|
||||
{if isset($roomDemand['room_num']) && $roomDemand['room_num']}
|
||||
{l s='Room'} {$roomDemand['room_num']|escape:'html':'UTF-8'}
|
||||
{else}
|
||||
{l s='Room'} {$roomCount|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-sm-12 room_demand_detail">
|
||||
{if isset($roomTypeDemands) && $roomTypeDemands}
|
||||
{foreach $roomTypeDemands as $idGlobalDemand => $demand}
|
||||
<div class="row room_demand_block">
|
||||
<div class="col-xs-6">
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
<input id_cart_booking="{$roomDemand['id']}" value="{$idGlobalDemand|escape:'html':'UTF-8'}" type="checkbox" class="id_room_type_demand" {if isset($roomDemand['selected_global_demands']) && $roomDemand['selected_global_demands'] && ($idGlobalDemand|in_array:$roomDemand['selected_global_demands'])}checked{/if} />
|
||||
</div>
|
||||
<div class="col-xs-10 demand_adv_option_block">
|
||||
<p>{$demand['name']|escape:'html':'UTF-8'}</p>
|
||||
{if isset($demand['adv_option']) && $demand['adv_option']}
|
||||
<select class="id_option">
|
||||
{foreach $demand['adv_option'] as $idOption => $option}
|
||||
{assign var=demand_key value="`$idGlobalDemand`-`$idOption`"}
|
||||
<option optionPrice="{$option['price_tax_excl']|escape:'html':'UTF-8'}" value="{$idOption|escape:'html':'UTF-8'}" {if isset($roomDemand['extra_demands'][$demand_key])}selected{/if} key="{$demand_key}">{$option['name']}</option>
|
||||
{if isset($roomDemand['extra_demands'][$demand_key])}
|
||||
{assign var=selected_adv_option value="$idOption"}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
{else}
|
||||
<input type="hidden" class="id_option" value="0" />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<p class="pull-right">
|
||||
<span class="extra_demand_option_price">
|
||||
{if isset($selected_adv_option) && isset($demand['adv_option'][$selected_adv_option]['price_tax_excl'])}{convertPrice price = $demand['adv_option'][$selected_adv_option]['price_tax_excl']|escape:'html':'UTF-8'}{else if isset($demand['adv_option']) && $demand['adv_option']}{convertPrice price = $demand['adv_option'][$demand['adv_option']|@key]['price_tax_excl']}{else}{convertPrice price = $demand['price_tax_excl']|escape:'html':'UTF-8'}{/if}
|
||||
</span>
|
||||
{if $demand['price_calc_method'] == HotelRoomTypeGlobalDemand::WK_PRICE_CALC_METHOD_EACH_DAY}
|
||||
{l s='/ night'}
|
||||
{/if}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{l s='Name'}</th>
|
||||
<th>{l s='Options'}</th>
|
||||
<th>{l s='Unit Price (tax excl.)'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $roomTypeDemands as $idGlobalDemand => $demand}
|
||||
<tr class="room_demand_block">
|
||||
<td>
|
||||
<input id_cart_booking="{$roomDemand['id']}" value="{$idGlobalDemand|escape:'html':'UTF-8'}" type="checkbox" class="id_room_type_demand" {if isset($roomDemand['selected_global_demands']) && $roomDemand['selected_global_demands'] && ($idGlobalDemand|in_array:$roomDemand['selected_global_demands'])}checked{/if} />
|
||||
</td>
|
||||
<td class="demand_adv_option_block">
|
||||
<p>{$demand['name']|escape:'html':'UTF-8'}</p>
|
||||
</td>
|
||||
<td class="demand_adv_option_block">
|
||||
{if isset($demand['adv_option']) && $demand['adv_option']}
|
||||
<select class="id_option">
|
||||
{foreach $demand['adv_option'] as $idOption => $option}
|
||||
{assign var=demand_key value="`$idGlobalDemand`-`$idOption`"}
|
||||
<option optionPrice="{$option['price_tax_excl']|escape:'html':'UTF-8'}" value="{$idOption|escape:'html':'UTF-8'}" {if isset($roomDemand['extra_demands'][$demand_key])}selected{/if} key="{$demand_key}">{$option['name']}</option>
|
||||
{if isset($roomDemand['extra_demands'][$demand_key])}
|
||||
{assign var=selected_adv_option value="$idOption"}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</select>
|
||||
{else}
|
||||
--
|
||||
<input type="hidden" class="id_option" value="0" />
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<span class="extra_demand_option_price">
|
||||
{if isset($selected_adv_option) && isset($demand['adv_option'][$selected_adv_option]['price_tax_excl'])}{convertPrice price = $demand['adv_option'][$selected_adv_option]['price_tax_excl']|escape:'html':'UTF-8'}{else if isset($demand['adv_option']) && $demand['adv_option']}{convertPrice price = $demand['adv_option'][$demand['adv_option']|@key]['price_tax_excl']}{else}{convertPrice price = $demand['price_tax_excl']|escape:'html':'UTF-8'}{/if}
|
||||
</span>
|
||||
{if $demand['price_calc_method'] == HotelRoomTypeGlobalDemand::WK_PRICE_CALC_METHOD_EACH_DAY}
|
||||
{l s='/ night'}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
@@ -103,71 +98,14 @@
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{if isset($roomTypeServiceProducts) && $roomTypeServiceProducts}
|
||||
<div id="room_type_service_product_desc" class="tab-pane{if !isset($selectedRoomDemands) || !$selectedRoomDemands} active{/if}">
|
||||
<div class="rooms_extra_demands_head">
|
||||
<p class="rooms_extra_demands_text">{l s='Add below services to the rooms for better hotel experience'}</p>
|
||||
</div>
|
||||
<div id="room_type_services_desc">
|
||||
{assign var=roomCount value=1}
|
||||
<div class="row room_demands_container">
|
||||
<div class="col-sm-12 demand_header">
|
||||
<span>
|
||||
<i class="icon-bed"></i>
|
||||
{if isset($selectedRoomServiceProduct['room_num']) && $selectedRoomServiceProduct['room_num']}
|
||||
{l s='Room'} {$selectedRoomServiceProduct['room_num']|escape:'html':'UTF-8'}
|
||||
{else}
|
||||
{l s='Room'} {$roomCount|escape:'html':'UTF-8'}
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
<div class="col-sm-12 room_demand_detail">
|
||||
{if isset($roomTypeServiceProducts) && $roomTypeServiceProducts}
|
||||
{foreach $roomTypeServiceProducts as $product}
|
||||
<div class="row room_demand_block">
|
||||
<div class="col-xs-5">
|
||||
<div class="row">
|
||||
<div class="col-xs-2">
|
||||
<input data-id_cart_booking="{$selectedRoomServiceProduct['id']}" value="{$product['id_product']|escape:'html':'UTF-8'}" type="checkbox" class="change_room_type_service_product" {if isset($selectedRoomServiceProduct['selected_service']) && $selectedRoomServiceProduct['selected_service'] && ($product['id_product']|array_key_exists:$selectedRoomServiceProduct['selected_service'])}checked{/if}/>
|
||||
</div>
|
||||
<div class="col-xs-10">
|
||||
<p>{$product['name']|escape:'html':'UTF-8'}</p>
|
||||
{if $product.allow_multiple_quantity}
|
||||
<div class="qty_container">
|
||||
<input type="number" class="form-control room_type_service_product_qty qty" id="qty_{$product.id_product}" name="service_product_qty_{$product.id_product}" data-id-product="{$product.id_product}" min="1" data-max-quantity="{$product.max_quantity}" value="{if isset($selectedRoomServiceProduct['selected_service']) && $selectedRoomServiceProduct['selected_service'] && ($product['id_product']|array_key_exists:$selectedRoomServiceProduct['selected_service'])}{$selectedRoomServiceProduct['selected_service'][$product['id_product']]['quantity']}{else}1{/if}">
|
||||
<p style="display:{if isset($selectedRoomServiceProduct['selected_service']) && $selectedRoomServiceProduct['selected_service'] && ($product['id_product']|array_key_exists:$selectedRoomServiceProduct['selected_service']) && $selectedRoomServiceProduct['selected_service'][$product['id_product']]['quantity'] > $product.max_quantity}block{else}none{/if}; margin-top: 4px;">
|
||||
<span class="label label-warning">{l s='Maximum allowed quantity: %s' sprintf=$product.max_quantity}</span>
|
||||
</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-3">
|
||||
{if $product['auto_add_to_cart'] && $product['price_addition_type'] == Product::PRICE_ADDITION_TYPE_INDEPENDENT}
|
||||
<span class="badge badge-info label">{l s='Convenience fee'}</span>
|
||||
{/if}
|
||||
{if $product['auto_add_to_cart'] && $product['price_addition_type'] == Product::PRICE_ADDITION_TYPE_WITH_ROOM}
|
||||
<span class="badge badge-info label">{l s='Auto added'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
{if ($product.show_price && !isset($restricted_country_mode)) || isset($groups)}
|
||||
<span class="pull-right">{convertPrice price=$product.price_tax_exc}</span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{include file='controllers/orders/modals/_add_order_extra_services_tab_content.tpl'}
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">{l s='Close'}</button>
|
||||
{if isset($loaderImg) && $loaderImg}
|
||||
<div class="loading_overlay">
|
||||
<img src='{$loaderImg}' class="loading-img"/>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -147,7 +147,7 @@
|
||||
</button>
|
||||
{if (isset($data.extra_demands) && $data.extra_demands) || isset($data.additional_service) && $data.additional_service}
|
||||
<br />
|
||||
<a href="#" id_room="{$data.id_room|escape:'html':'UTF-8'}" date_from="{$data.date_from|escape:'html':'UTF-8'}" date_to="{$data.date_to|escape:'html':'UTF-8'}" id_product="{$data.id_product|escape:'html':'UTF-8'}" id_cart="{$data.id_cart|escape:'html':'UTF-8'}" class="open_rooms_extra_demands btn btn-success" title="{l s='Click here to add or remove the extra services of this room type.'}">
|
||||
<a href="#" id_hotel_cart_booking="{$data.id|escape:'html':'UTF-8'}" id_room="{$data.id_room|escape:'html':'UTF-8'}" date_from="{$data.date_from|escape:'html':'UTF-8'}" date_to="{$data.date_to|escape:'html':'UTF-8'}" id_product="{$data.id_product|escape:'html':'UTF-8'}" id_cart="{$data.id_cart|escape:'html':'UTF-8'}" class="open_rooms_extra_demands btn btn-success" title="{l s='Click here to add or remove the extra services of this room type.'}">
|
||||
<i class="icon-pencil"></i> {l s='Services'}
|
||||
</a>
|
||||
{/if}
|
||||
@@ -213,23 +213,14 @@
|
||||
color:#979797;
|
||||
font-size:12px;}
|
||||
/*Extra demands CSS*/
|
||||
#rooms_type_extra_demands .modal-header {
|
||||
padding-bottom: 0px}
|
||||
#rooms_extra_demands {
|
||||
font-size: 16px;}
|
||||
#rooms_extra_demands .room_demands_container {
|
||||
border: 1px solid #ddd;}
|
||||
#rooms_extra_demands .demand_header {
|
||||
padding: 10px;
|
||||
color: #333;
|
||||
border-bottom: 1px solid #ddd;}
|
||||
#rooms_extra_demands .rooms_extra_demands_head {
|
||||
margin-bottom: 18px;}
|
||||
#rooms_extra_demands .room_demand_block {
|
||||
margin-bottom: 15px;
|
||||
color: #333;
|
||||
font-size: 14px;}
|
||||
#rooms_extra_demands .room_demand_detail {
|
||||
padding: 15px 15px 0px 15px;}
|
||||
color: #333;}
|
||||
#room_type_service_product_desc #back_to_service_btn {
|
||||
display: none;}
|
||||
#add_new_room_services_block {
|
||||
display: none;}
|
||||
</style>
|
||||
{/if}
|
||||
|
||||
@@ -177,7 +177,7 @@
|
||||
$('body').on('click', '.delete_service_product', function(){
|
||||
if (confirm("{l s='Are you sure?'}"))
|
||||
{
|
||||
|
||||
$(".loading_overlay").show();
|
||||
$.ajax({
|
||||
type:"POST",
|
||||
url: "{$link->getAdminLink('AdminOrders')|addslashes}",
|
||||
@@ -204,7 +204,10 @@
|
||||
{
|
||||
alert("l s='Some error occured.please try again.'}");
|
||||
}
|
||||
}
|
||||
},
|
||||
complete: function(){
|
||||
$(".loading_overlay").hide();
|
||||
}
|
||||
});
|
||||
$(this).closest("tr").remove();
|
||||
}
|
||||
@@ -1499,6 +1502,9 @@
|
||||
var idRoom = $(this).attr('id_room');
|
||||
var dateFrom = $(this).attr('date_from');
|
||||
var dateTo = $(this).attr('date_to');
|
||||
var idHotelCartBooking = $(this).attr('id_hotel_cart_booking');
|
||||
|
||||
$(".loading_overlay").show();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
@@ -1513,17 +1519,29 @@
|
||||
id_room: idRoom,
|
||||
id_cart: idCart,
|
||||
id_product: idProduct,
|
||||
id_hotel_cart_booking: idHotelCartBooking,
|
||||
action: 'getRoomTypeCartDemands',
|
||||
ajax: true
|
||||
},
|
||||
success: function(response) {
|
||||
if (response.status) {
|
||||
$('#customer_cart_details').after(response.html_exta_demands);
|
||||
if (response.hasError) {
|
||||
var errorHtml = error_found_txt + ':<br>';
|
||||
errorHtml += '<ol>';
|
||||
$.each(response.errors, function(key, errorMsg) {
|
||||
errorHtml += '<li>' + errorMsg + '</li>';
|
||||
});
|
||||
errorHtml += '</ol>';
|
||||
showErrorMessage(errorHtml);
|
||||
} else {
|
||||
$('#customer_cart_details').after(response.html_exta_demands);
|
||||
// $('#rooms_type_extra_demands').find('#room_type_demands_desc').html('');
|
||||
// $('#rooms_type_extra_demands').find('#room_type_demands_desc').append(response.html_exta_demands);
|
||||
$('#rooms_type_extra_demands').modal('show');
|
||||
}
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
$(".loading_overlay").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
$(document).on('hidden.bs.modal', '#rooms_type_extra_demands', function (e) {
|
||||
@@ -1542,6 +1560,7 @@
|
||||
});
|
||||
});
|
||||
var idBookingCart = $(this).attr('id_cart_booking');
|
||||
$(".loading_overlay").show();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
@@ -1563,7 +1582,10 @@
|
||||
} else {
|
||||
showErrorMessage(txtExtraDemandErr);
|
||||
}
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
$(".loading_overlay").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1584,6 +1606,7 @@
|
||||
});
|
||||
});
|
||||
var idBookingCart = $(this).closest('.room_demand_block').find('.id_room_type_demand').attr('id_cart_booking');
|
||||
$(".loading_overlay").show();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
dataType: 'JSON',
|
||||
@@ -1605,25 +1628,14 @@
|
||||
} else {
|
||||
showErrorMessage(txtExtraDemandErr);
|
||||
}
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
$(".loading_overlay").hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.change_room_type_service_product', function() {
|
||||
updateServiceProducts(this);
|
||||
});
|
||||
|
||||
$(document).on('focusout', '#rooms_type_extra_demands .qty', function(e) {
|
||||
var qty_wntd = $(this).val();
|
||||
if (qty_wntd == '' || !$.isNumeric(qty_wntd)) {
|
||||
$(this).val(1);
|
||||
}
|
||||
if ($(this).closest('.room_demand_block').find('.change_room_type_service_product').is(':checked')) {
|
||||
updateServiceProducts($(this).closest('.room_demand_block').find('.change_room_type_service_product'));
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('keyup', '#payment_module_name', function() {
|
||||
let paymentMethod = $('#payment_module_name').val().trim().toLowerCase();
|
||||
|
||||
@@ -1682,15 +1694,42 @@
|
||||
}
|
||||
});
|
||||
|
||||
function updateServiceProducts(element)
|
||||
{
|
||||
var operator = $(element).is(':checked') ? 'up' : 'down';
|
||||
var id_product = $(element).val();
|
||||
var id_cart_booking = $(element).data('id_cart_booking');
|
||||
var qty = $(element).closest('.room_demand_block').find('input.qty').val();
|
||||
if (typeof(qty) == 'undefined') {
|
||||
qty = 1;
|
||||
// click on back button on created facilities while additional facilities edit
|
||||
$(document).on('click', '#back_to_service_btn', function() {
|
||||
$('#room_type_services_desc').show();
|
||||
$('#add_new_room_services_block').hide();
|
||||
$('#back_to_service_btn').hide();
|
||||
});
|
||||
|
||||
// Add new custom service: Show hide new custom service form
|
||||
$(document).on('click', '#btn_new_room_service', function() {
|
||||
$('#add_new_room_services_block').show();
|
||||
$('#back_to_service_btn').show();
|
||||
$('#room_type_services_desc').hide();
|
||||
});
|
||||
|
||||
// Add new custom service: change auto added option
|
||||
$(document).on('change', '#add_new_room_services_form input[name="new_service_auto_added"]', function() {
|
||||
var room_type_tax_rule_group_exist = $("#room_type_tax_rule_group_exist").val();
|
||||
if ($(this).val() == 1) {
|
||||
$("#new_service_price_tax_rule_container").hide();
|
||||
$("#new_service_price_addition_type_container").show();
|
||||
$("#new_service_qty_container").hide();
|
||||
} else {
|
||||
$("#new_service_price_addition_type_container").hide();
|
||||
$("#new_service_qty_container").show();
|
||||
$("#new_service_price_tax_rule_container").show();
|
||||
}
|
||||
});
|
||||
|
||||
// Add new custom service to the room
|
||||
$(document).on('submit', '#add_new_room_services_form', function(e) {
|
||||
e.preventDefault();
|
||||
var form_data = new FormData(this);
|
||||
form_data.append('ajax', true);
|
||||
form_data.append('action', 'addNewRoomServices');
|
||||
|
||||
$(".loading_overlay").show();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: {
|
||||
@@ -1699,25 +1738,80 @@
|
||||
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
|
||||
dataType: 'JSON',
|
||||
cache: false,
|
||||
data: {
|
||||
operator: operator,
|
||||
id_product: id_product,
|
||||
id_cart_booking: id_cart_booking,
|
||||
qty: qty,
|
||||
action: 'updateServiceProduct',
|
||||
ajax: true
|
||||
},
|
||||
data: form_data,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(jsonData) {
|
||||
if (!jsonData.hasError) {
|
||||
if (jsonData.service_panel) {
|
||||
$('#room_type_service_product_desc').replaceWith(jsonData.service_panel);
|
||||
}
|
||||
showSuccessMessage(txtExtraDemandSucc);
|
||||
} else {
|
||||
showErrorMessage(jsonData.errors);
|
||||
|
||||
var errorHtml = error_found_txt + ':<br>';
|
||||
errorHtml += '<ol>';
|
||||
$.each(jsonData.errors, function(key, errorMsg) {
|
||||
errorHtml += '<li>' + errorMsg + '</li>';
|
||||
});
|
||||
errorHtml += '</ol>';
|
||||
showErrorMessage(errorHtml);
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
$(".loading_overlay").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
$(document).on('click', '.change_room_type_service_product', function() {
|
||||
if ($(this).prop('checked')) {
|
||||
$("#selected_service_product_"+$(this).val()).val(1);
|
||||
} else {
|
||||
$("#selected_service_product_"+$(this).val()).val(0);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('submit', '#update_selected_room_services_form', function(e) {
|
||||
e.preventDefault();
|
||||
var form_data = new FormData(this);
|
||||
form_data.append('ajax', true);
|
||||
form_data.append('action', 'updateSelectedRoomServices');
|
||||
|
||||
$(".loading_overlay").show();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: {
|
||||
"cache-control": "no-cache"
|
||||
},
|
||||
url: "{$link->getAdminLink('AdminCarts')|addslashes}",
|
||||
dataType: 'JSON',
|
||||
cache: false,
|
||||
data: form_data,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(jsonData) {
|
||||
if (!jsonData.hasError) {
|
||||
if (jsonData.service_panel) {
|
||||
$('#room_type_service_product_desc').replaceWith(jsonData.service_panel);
|
||||
}
|
||||
showSuccessMessage(txtExtraDemandSucc);
|
||||
} else {
|
||||
if (jsonData.errors != 'undefined' && jsonData.errors.length) {
|
||||
var errorHtml = error_found_txt + ':<br>';
|
||||
errorHtml += '<ol>';
|
||||
$.each(jsonData.errors, function(key, errorMsg) {
|
||||
errorHtml += '<li>' + errorMsg + '</li>';
|
||||
});
|
||||
errorHtml += '</ol>';
|
||||
showErrorMessage(errorHtml);
|
||||
}
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
$(".loading_overlay").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -2290,8 +2384,7 @@
|
||||
{addJsDefL name='max_children_txt'}{l s='Maximum children occupancy reached' js=1}{/addJsDefL}
|
||||
{addJsDefL name='no_children_allowed_txt'}{l s='Only adults can be accommodated' js=1}{/addJsDefL}
|
||||
{addJsDefL name='invalid_occupancy_txt'}{l s='Invalid occupancy(adults/children) found.' js=1}{/addJsDefL}
|
||||
|
||||
|
||||
{addJsDefL name='error_found_txt'}{l s='Errors found' js=1}{/addJsDefL}
|
||||
{/strip}
|
||||
|
||||
<div id="loader_container">
|
||||
|
||||
@@ -1270,5 +1270,6 @@
|
||||
{addJsDefL name=txt_booking_document_upload_success}{l s='Document uploaded successfully.' js=1}{/addJsDefL}
|
||||
{addJsDefL name=txt_booking_document_delete_confirm}{l s='Are you sure?' js=1}{/addJsDefL}
|
||||
{addJsDefL name=txt_booking_document_delete_success}{l s='Document deleted successfully.' js=1}{/addJsDefL}
|
||||
{addJsDefL name='error_found_txt'}{l s='Errors found' js=1}{/addJsDefL}
|
||||
{/strip}
|
||||
{/block}
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
{*
|
||||
* Since 2010 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright Since 2010 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div id="room_type_service_product_desc" class="tab-pane{if !isset($selectedRoomDemands) || !$selectedRoomDemands} active{/if}">
|
||||
{if $customServiceAllowed}
|
||||
<div class="row">
|
||||
<button id="btn_new_room_service" class="btn btn-success pull-right"><i class="icon-plus-circle"></i> {l s='Add a new service'}</button>
|
||||
<button id="back_to_service_btn" class="btn btn-default"><i class="icon-arrow-left"></i> {l s='Back'}</button>
|
||||
</div>
|
||||
<hr>
|
||||
{/if}
|
||||
{if isset($serviceProducts) && $serviceProducts}
|
||||
<div id="room_type_services_desc">
|
||||
{assign var=roomCount value=1}
|
||||
<div class="row room_demands_container">
|
||||
<div class="col-sm-12 room_demand_detail">
|
||||
{if isset($serviceProducts) && $serviceProducts}
|
||||
<form id="update_selected_room_services_form">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>{l s='Name'}</th>
|
||||
<th class="fixed-width-sm"></th>
|
||||
<th class="fixed-width-sm">{l s='Quantity'}</th>
|
||||
<th>{l s='Unit Price (tax excl.)'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $serviceProducts as $product}
|
||||
<tr class="room_demand_block">
|
||||
<td>
|
||||
<input data-id_cart_booking="{$selectedRoomServiceProduct['id']}" value="{$product['id_product']|escape:'html':'UTF-8'}" type="checkbox" class="change_room_type_service_product" {if isset($selectedRoomServiceProduct['selected_service']) && $selectedRoomServiceProduct['selected_service'] && ($product['id_product']|array_key_exists:$selectedRoomServiceProduct['selected_service'])}checked{/if}/>
|
||||
|
||||
<input id="selected_service_product_{$product['id_product']}" type="hidden" value="{if isset($selectedRoomServiceProduct['selected_service']) && $selectedRoomServiceProduct['selected_service'] && ($product['id_product']|array_key_exists:$selectedRoomServiceProduct['selected_service'])}1{else}0{/if}" name="selected_service_product[{$product.id_product}]"/>
|
||||
</td>
|
||||
<td>
|
||||
<p>{$product['name']|escape:'html':'UTF-8'}</p>
|
||||
</td>
|
||||
<td>
|
||||
{if $product['auto_add_to_cart'] && $product['price_addition_type'] == Product::PRICE_ADDITION_TYPE_INDEPENDENT}
|
||||
<span class="badge badge-info label">{l s='Convenience fee'}</span>
|
||||
{/if}
|
||||
{if $product['auto_add_to_cart'] && $product['price_addition_type'] == Product::PRICE_ADDITION_TYPE_WITH_ROOM}
|
||||
<span class="badge badge-info label">{l s='Auto added'}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if $product.allow_multiple_quantity}
|
||||
<div class="qty_container">
|
||||
<input type="number" class="form-control room_type_service_product_qty qty" id="qty_{$product.id_product}" name="service_qty[{$product.id_product}]" data-id-product="{$product.id_product}" min="1" data-max-quantity="{$product.max_quantity}" value="{if isset($selectedRoomServiceProduct['selected_service']) && $selectedRoomServiceProduct['selected_service'] && ($product['id_product']|array_key_exists:$selectedRoomServiceProduct['selected_service'])}{$selectedRoomServiceProduct['selected_service'][$product['id_product']]['quantity']}{else}1{/if}" name="service_qty[{$product['id_product']|escape:'html':'UTF-8'}]">
|
||||
|
||||
<p style="display:{if isset($selectedRoomServiceProduct['selected_service']) && $selectedRoomServiceProduct['selected_service'] && ($product['id_product']|array_key_exists:$selectedRoomServiceProduct['selected_service']) && $selectedRoomServiceProduct['selected_service'][$product['id_product']]['quantity'] > $product.max_quantity}block{else}none{/if}; margin-top: 4px;">
|
||||
<span class="label label-warning">{l s='Maximum allowed quantity: %s' sprintf=$product.max_quantity}</span>
|
||||
</p>
|
||||
</div>
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
{if ($product.show_price && !isset($restricted_country_mode)) || isset($groups)}
|
||||
<div id="service_cart_price_{$selectedRoomServiceProduct['id']}_{$product['id_product']}_input" class="input-group">
|
||||
<span class="input-group-addon">
|
||||
{$cartCurrency->sign}
|
||||
</span>
|
||||
<input class="service_cart_price_input" id="service_cart_price_{$selectedRoomServiceProduct['id']}_{$product['id_product']}" type="text" value="{$product.price_tax_exc}" name="service_price[{$product['id_product']|escape:'html':'UTF-8'}]"/>
|
||||
{if Product::PRICE_CALCULATION_METHOD_PER_DAY == $product['price_calculation_method']}
|
||||
<span class="input-group-addon">{l s='/ night'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
<input type="hidden" name="id_hotel_cart_booking" value="{$id_hotel_cart_booking}">
|
||||
<div class="modal-footer">
|
||||
<button type="submit" id="update_selected_services" class="btn btn-primary"><i class="icon icon-save"></i> {l s="Update Services"}</button>
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $customServiceAllowed}
|
||||
<div id="add_new_room_services_block" class="row">
|
||||
<form id="add_new_room_services_form" class="col-sm-12 room_services_container">
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label required">{l s='Name'}</label>
|
||||
<input type="text" class="form-control" name="new_service_name"/>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label required">{l s='Price(tax excl.)'}</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$cartCurrency->sign}</span>
|
||||
<input type="text" class="form-control" name="new_service_price"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Price calculation method'}</label>
|
||||
<select class="form-control" name="new_service_price_calc_method">
|
||||
<option value="{Product::PRICE_CALCULATION_METHOD_PER_BOOKING}">{l s='Add price once for the booking range'}</option>
|
||||
<option value="{Product::PRICE_CALCULATION_METHOD_PER_DAY}">{l s='Add price for each day of booking'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Auto added service'}</label>
|
||||
<div>
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="new_service_auto_added" id="new_service_auto_added_on" value="1"/>
|
||||
<label for="new_service_auto_added_on" class="radioCheck">
|
||||
{l s='Yes'}
|
||||
</label>
|
||||
<input type="radio" name="new_service_auto_added" id="new_service_auto_added_off" value="0" checked="checked"/>
|
||||
<label for="new_service_auto_added_off" class="radioCheck">
|
||||
{l s='No'}
|
||||
</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div id="new_service_price_tax_rule_container" class="col-sm-6">
|
||||
<label class="control-label">{l s='Tax rule'}</label>
|
||||
<select name="new_service_price_tax_rule_group">
|
||||
{foreach from=$taxRulesGroups item=taxRuleGroup}
|
||||
<option value="{$taxRuleGroup.id_tax_rules_group}">{$taxRuleGroup.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div id="new_service_price_addition_type_container" class="col-sm-6" style="display:none;">
|
||||
<label class="control-label">{l s='Price display preference'}</label>
|
||||
<select name="new_service_price_addition_type" id="new_service_price_addition_type">
|
||||
<option value="{Product::PRICE_ADDITION_TYPE_WITH_ROOM}">{l s='Add price in room price'}</option>
|
||||
<option value="{Product::PRICE_ADDITION_TYPE_INDEPENDENT}">{l s='Add price as convenience Fee'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="new_service_qty_container" class="col-sm-6">
|
||||
<label class="control-label required">{l s='Quantity'}</label>
|
||||
<input type="number" class="form-control qty" min="1" name="new_service_qty" value="1">
|
||||
</div>
|
||||
</div>
|
||||
<input type="hidden" name="id_hotel_cart_booking" value="{$id_hotel_cart_booking}">
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-12 help-block">
|
||||
{l s='Note: If auto added service is enabled, then tax of the booking\'s room type will be applicable.'}
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="submit" id="save_new_service" class="btn btn-primary"><i class="icon icon-save"></i> {l s="Update Service"}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
@@ -20,82 +20,96 @@
|
||||
<div id="room_type_service_product_desc" class="tab-pane {if isset($show_active) && $show_active}active{/if} extra-services-container">
|
||||
{if isset($orderEdit) && $orderEdit}
|
||||
|
||||
<p class="col-sm-12 facility_nav_btn">
|
||||
<button id="btn_new_room_service" class="btn btn-success"><i class="icon-plus"></i> {l s='Add new service'}</button>
|
||||
<div class="col-sm-12 facility_nav_btn">
|
||||
{if $customServiceAllowed}
|
||||
<button id="btn_new_room_service" class="btn btn-success pull-right"><i class="icon-plus-circle"></i> {l s='Add a new service'}</button>
|
||||
{/if}
|
||||
<button id="btn_new_existing_room_service" class="btn btn-success"><i class="icon-plus-circle"></i> {l s='Add existing service'}</button>
|
||||
<button id="back_to_service_btn" class="btn btn-default"><i class="icon-arrow-left"></i> {l s='Back'}</button>
|
||||
</p>
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
|
||||
{* Already selected room services *}
|
||||
<div class="col-sm-12 room_ordered_services table-responsive">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Name'}</th>
|
||||
<th class="fixed-width-sm"></th>
|
||||
<th class="fixed-width-sm text-center">{l s='Quantity'}</th>
|
||||
<th>{l s='Unit Price (tax excl.)'}</th>
|
||||
<th>{l s='Total Price (tax excl.)'}</th>
|
||||
<th class="text-right">{l s='Action'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if isset($additionalServices) && $additionalServices}
|
||||
{foreach $additionalServices['additional_services'] as $service}
|
||||
<tr class="room_demand_block" data-id_room_type_service_product_order_detail="{$service['id_room_type_service_product_order_detail']}">
|
||||
<td>
|
||||
<div>{$service['name']|escape:'html':'UTF-8'}</div>
|
||||
</td>
|
||||
<td>
|
||||
{if $service['product_auto_add'] && $service['product_price_addition_type'] == Product::PRICE_ADDITION_TYPE_WITH_ROOM}
|
||||
<span class="badge badge-info label">{l s='Auto added'}</span><br>
|
||||
{/if}
|
||||
{if $service['product_auto_add'] && $service['product_price_addition_type'] == Product::PRICE_ADDITION_TYPE_INDEPENDENT}
|
||||
<span class="badge badge-info label">{l s='Convenience fee'}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if $service['allow_multiple_quantity']}
|
||||
<div class="qty_container">
|
||||
<input type="number" class="form-control qty" min="1" data-id_product="{$service['id_product']|escape:'html':'UTF-8'}" value="{$service['quantity']|escape:'html':'UTF-8'}">
|
||||
{if $service['max_quantity']}
|
||||
<p style="display:{if $service['quantity'] > $service['max_quantity']}block{else}none{/if}; margin-top: 4px;">
|
||||
<span class="label label-warning">{l s='Maximum allowed quantity: %s' sprintf=$service['max_quantity']}</span>
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$currencySign}</span>
|
||||
<input type="text" class="form-control unit_price" value="{Tools::ps_round($service['unit_price_tax_excl'], 2)}" data-id-product="{$product['id_product']}">
|
||||
{if Product::PRICE_CALCULATION_METHOD_PER_DAY == $service.product_price_calculation_method}
|
||||
<span class="input-group-addon">{l s='/ night'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{* {if $service['product_price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY}
|
||||
{l s='/ night'}
|
||||
{/if} *}
|
||||
</td>
|
||||
<td>{displayPrice price=$service['total_price_tax_excl']|escape:'html':'UTF-8' currency=$orderCurrency}</td>
|
||||
<td class="text-right"><a class="btn btn-danger pull-right del_room_additional_service" data-id_room_type_service_product_order_detail="{$service['id_room_type_service_product_order_detail']}" href="#"><i class="icon-trash"></i></a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<i class="icon-warning"></i> {l s='No services added yet.'}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
<form id="update_selected_room_services_form">
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{l s='Name'}</th>
|
||||
<th class="fixed-width-sm"></th>
|
||||
<th class="fixed-width-sm text-center">{l s='Quantity'}</th>
|
||||
<th>{l s='Unit Price (tax excl.)'}</th>
|
||||
<th>{l s='Total Price (tax excl.)'}</th>
|
||||
<th class="text-right">{l s='Action'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{if isset($additionalServices) && $additionalServices}
|
||||
{foreach $additionalServices['additional_services'] as $service}
|
||||
<tr class="room_demand_block" data-id_room_type_service_product_order_detail="{$service['id_room_type_service_product_order_detail']}">
|
||||
<td>
|
||||
<div>{$service['name']|escape:'html':'UTF-8'}</div>
|
||||
<input value="{$service['id_room_type_service_product_order_detail']|escape:'html':'UTF-8'}" name="id_service_product_order_detail[]" type="hidden"/>
|
||||
</td>
|
||||
<td>
|
||||
{if $service['product_auto_add'] && $service['product_price_addition_type'] == Product::PRICE_ADDITION_TYPE_WITH_ROOM}
|
||||
<span class="badge badge-info label">{l s='Auto added'}</span><br>
|
||||
{/if}
|
||||
{if $service['product_auto_add'] && $service['product_price_addition_type'] == Product::PRICE_ADDITION_TYPE_INDEPENDENT}
|
||||
<span class="badge badge-info label">{l s='Convenience fee'}</span>
|
||||
{/if}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
{if $service['allow_multiple_quantity']}
|
||||
<div class="qty_container">
|
||||
<input type="number" class="form-control qty" min="1" data-id_product="{$service['id_product']|escape:'html':'UTF-8'}" value="{$service['quantity']|escape:'html':'UTF-8'}" name="service_qty[{$service['id_room_type_service_product_order_detail']|escape:'html':'UTF-8'}]">
|
||||
{if $service['max_quantity']}
|
||||
<p style="display:{if $service['quantity'] > $service['max_quantity']}block{else}none{/if}; margin-top: 4px;">
|
||||
<span class="label label-warning">{l s='Maximum allowed quantity: %s' sprintf=$service['max_quantity']}</span>
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
{else}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
<td>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$currencySign}</span>
|
||||
<input type="text" class="form-control unit_price" value="{Tools::ps_round($service['unit_price_tax_excl'], 2)}" data-id-product="{$service['id_product']}" name="service_price[{$service['id_room_type_service_product_order_detail']}]">
|
||||
{if Product::PRICE_CALCULATION_METHOD_PER_DAY == $service.product_price_calculation_method}
|
||||
<span class="input-group-addon">{l s='/ night'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{* {if $service['product_price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY}
|
||||
{l s='/ night'}
|
||||
{/if} *}
|
||||
</td>
|
||||
<td>{displayPrice price=$service['total_price_tax_excl']|escape:'html':'UTF-8' currency=$orderCurrency}</td>
|
||||
<td class="text-right"><a class="btn btn-danger pull-right del_room_additional_service" data-id_room_type_service_product_order_detail="{$service['id_room_type_service_product_order_detail']}" href="#"><i class="icon-trash"></i></a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
{else}
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<i class="icon-warning"></i> {l s='No services added yet.'}
|
||||
</td>
|
||||
</tr>
|
||||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="submit" id="update_selected_services" class="btn btn-primary"><i class="icon icon-save"></i> {l s="Update Services"}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<form id="add_room_services_form" class="col-sm-12 room_services_container">
|
||||
|
||||
{* add already available service interface *}
|
||||
<form id="add_existing_room_services_form" class="col-sm-12 room_services_container">
|
||||
<div class="room_demand_detail">
|
||||
{if isset($roomTypeServiceProducts) && $roomTypeServiceProducts}
|
||||
{if isset($serviceProducts) && $serviceProducts}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -107,7 +121,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{foreach $roomTypeServiceProducts as $product}
|
||||
{foreach $serviceProducts as $product}
|
||||
<tr class="room_demand_block">
|
||||
<td>
|
||||
<input data-id_booking_detail="{$id_booking_detail}" value="{$product['id_product']|escape:'html':'UTF-8'}" name="selected_service[]" type="checkbox" class="id_room_type_service"/>
|
||||
@@ -156,6 +170,82 @@
|
||||
<input type="hidden" name="id_booking_detail" value="{$id_booking_detail}">
|
||||
</form>
|
||||
|
||||
{if $customServiceAllowed}
|
||||
<form id="add_new_room_services_form" class="col-sm-12 room_services_container">
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label required">{l s='Name'}</label>
|
||||
<input type="text" class="form-control" name="new_service_name"/>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label required">{l s='Price(tax excl.)'}</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">{$currencySign}</span>
|
||||
<input type="text" class="form-control" name="new_service_price"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Price calculation method'}</label>
|
||||
<select class="form-control" name="new_service_price_calc_method">
|
||||
<option value="{Product::PRICE_CALCULATION_METHOD_PER_BOOKING}">{l s='Add price once for the booking range'}</option>
|
||||
<option value="{Product::PRICE_CALCULATION_METHOD_PER_DAY}">{l s='Add price for each day of booking'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="control-label">{l s='Auto added service'}</label>
|
||||
<div>
|
||||
<span class="switch prestashop-switch fixed-width-lg">
|
||||
<input type="radio" name="new_service_auto_added" id="new_service_auto_added_on" value="1"/>
|
||||
<label for="new_service_auto_added_on" class="radioCheck">
|
||||
{l s='Yes'}
|
||||
</label>
|
||||
<input type="radio" name="new_service_auto_added" id="new_service_auto_added_off" value="0" checked="checked"/>
|
||||
<label for="new_service_auto_added_off" class="radioCheck">
|
||||
{l s='No'}
|
||||
</label>
|
||||
<a class="slide-button btn"></a>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row form-group">
|
||||
<div id="new_service_price_tax_rule_container" class="col-sm-6">
|
||||
<label class="control-label">{l s='Tax rule'}</label>
|
||||
<select name="new_service_price_tax_rule_group">
|
||||
{foreach from=$taxRulesGroups item=taxRuleGroup}
|
||||
<option value="{$taxRuleGroup.id_tax_rules_group}">{$taxRuleGroup.name}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</div>
|
||||
<div id="new_service_price_addition_type_container" class="col-sm-6" style="display:none;">
|
||||
<label class="control-label">{l s='Price display preference'}</label>
|
||||
<select name="new_service_price_addition_type" id="new_service_price_addition_type">
|
||||
<option value="{Product::PRICE_ADDITION_TYPE_WITH_ROOM}">{l s='Add price in room price'}</option>
|
||||
<option value="{Product::PRICE_ADDITION_TYPE_INDEPENDENT}">{l s='Add price as convenience Fee'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div id="new_service_qty_container" class="col-sm-6">
|
||||
<label class="control-label required">{l s='Quantity'}</label>
|
||||
<input type="number" class="form-control qty" min="1" name="new_service_qty" value="1">
|
||||
</div>
|
||||
</div>
|
||||
{if $roomTypeTaxRuleGroupExist}
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-12 help-block">
|
||||
{l s='Note: If auto added service is enabled, then tax of the booking\'s room type will be applicable.'}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<input type="hidden" name="id_booking_detail" value="{$id_booking_detail}">
|
||||
<input type="hidden" id="room_type_tax_rule_group_exist" name="room_type_tax_rule_group_exist" value="{$roomTypeTaxRuleGroupExist}">
|
||||
<div class="modal-footer">
|
||||
<button type="submit" id="save_new_service" class="btn btn-primary"><i class="icon icon-save"></i> {l s="Update Service"}</button>
|
||||
</div>
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
{elseif isset($additionalServices) && $additionalServices}
|
||||
<table class="table room_demand_detail">
|
||||
<thead>
|
||||
|
||||
@@ -1192,6 +1192,7 @@ class FrontControllerCore extends Controller
|
||||
'token' => Tools::getToken(),
|
||||
'priceDisplayPrecision' => _PS_PRICE_DISPLAY_PRECISION_,
|
||||
'content_only' => (int)Tools::getValue('content_only'),
|
||||
'WK_DISPLAY_PROPERTIES_LINK_IN_HEADER' => Configuration::get('WK_DISPLAY_PROPERTIES_LINK_IN_HEADER'),
|
||||
));
|
||||
|
||||
$this->context->smarty->assign($this->initLogoAndFavicon());
|
||||
|
||||
@@ -1092,80 +1092,102 @@ class AdminCartsControllerCore extends AdminController
|
||||
// Process to get extra demands of any room while order creation process form.tpl
|
||||
public function ajaxProcessGetRoomTypeCartDemands()
|
||||
{
|
||||
$response = array('status' => false);
|
||||
if ($idProduct = Tools::getValue('id_product')) {
|
||||
if (($dateFrom = Tools::getValue('date_from'))
|
||||
&& ($dateTo = Tools::getValue('date_to'))
|
||||
&& ($idRoom = Tools::getValue('id_room'))
|
||||
&& ($idCart = Tools::getValue('id_cart'))
|
||||
) {
|
||||
$objCartBookingData = new HotelCartBookingData();
|
||||
if ($selectedRoomDemands = $objCartBookingData->getCartExtraDemands(
|
||||
$idCart,
|
||||
$idProduct,
|
||||
$idRoom,
|
||||
$dateFrom,
|
||||
$dateTo
|
||||
)) {
|
||||
// get room type additional demands
|
||||
$objRoomDemands = new HotelRoomTypeDemand();
|
||||
if ($roomTypeDemands = $objRoomDemands->getRoomTypeDemands($idProduct)) {
|
||||
foreach ($roomTypeDemands as &$demand) {
|
||||
// if demand has advance options then set demand price as first advance option price.
|
||||
if (isset($demand['adv_option']) && $demand['adv_option']) {
|
||||
$demand['price'] = current($demand['adv_option'])['price'];
|
||||
}
|
||||
$response['hasError'] = false;
|
||||
$response['errors'] = [];
|
||||
if (($idProduct = Tools::getValue('id_product'))
|
||||
&& ($dateFrom = Tools::getValue('date_from'))
|
||||
&& ($dateTo = Tools::getValue('date_to'))
|
||||
&& ($idRoom = Tools::getValue('id_room'))
|
||||
&& ($idCart = Tools::getValue('id_cart'))
|
||||
&& ($idHotelCartBooking = Tools::getValue('id_hotel_cart_booking'))
|
||||
) {
|
||||
$objCartBookingData = new HotelCartBookingData();
|
||||
if ($selectedRoomDemands = $objCartBookingData->getCartExtraDemands(
|
||||
$idCart,
|
||||
$idProduct,
|
||||
$idRoom,
|
||||
$dateFrom,
|
||||
$dateTo
|
||||
)) {
|
||||
// get room type additional demands
|
||||
$objRoomDemands = new HotelRoomTypeDemand();
|
||||
if ($roomTypeDemands = $objRoomDemands->getRoomTypeDemands($idProduct)) {
|
||||
foreach ($roomTypeDemands as &$demand) {
|
||||
// if demand has advance options then set demand price as first advance option price.
|
||||
if (isset($demand['adv_option']) && $demand['adv_option']) {
|
||||
$demand['price'] = current($demand['adv_option'])['price'];
|
||||
}
|
||||
foreach ($selectedRoomDemands as &$selectedDemand) {
|
||||
$objRoom = new HotelRoomInformation($selectedDemand['id_room']);
|
||||
$selectedDemand['room_num'] = $objRoom->room_num;
|
||||
if (isset($selectedDemand['extra_demands']) && $selectedDemand['extra_demands']) {
|
||||
$extraDmd = array();
|
||||
foreach ($selectedDemand['extra_demands'] as $sDemand) {
|
||||
$selectedDemand['selected_global_demands'][] = $sDemand['id_global_demand'];
|
||||
$extraDmd[$sDemand['id_global_demand'].'-'.$sDemand['id_option']] = $sDemand;
|
||||
}
|
||||
$selectedDemand['extra_demands'] = $extraDmd;
|
||||
}
|
||||
}
|
||||
$this->context->smarty->assign('roomTypeDemands', $roomTypeDemands);
|
||||
$this->context->smarty->assign('selectedRoomDemands', $selectedRoomDemands);
|
||||
}
|
||||
foreach ($selectedRoomDemands as &$selectedDemand) {
|
||||
$objRoom = new HotelRoomInformation($selectedDemand['id_room']);
|
||||
$selectedDemand['room_num'] = $objRoom->room_num;
|
||||
if (isset($selectedDemand['extra_demands']) && $selectedDemand['extra_demands']) {
|
||||
$extraDmd = array();
|
||||
foreach ($selectedDemand['extra_demands'] as $sDemand) {
|
||||
$selectedDemand['selected_global_demands'][] = $sDemand['id_global_demand'];
|
||||
$extraDmd[$sDemand['id_global_demand'].'-'.$sDemand['id_option']] = $sDemand;
|
||||
}
|
||||
$selectedDemand['extra_demands'] = $extraDmd;
|
||||
}
|
||||
}
|
||||
$this->context->smarty->assign('roomTypeDemands', $roomTypeDemands);
|
||||
$this->context->smarty->assign('selectedRoomDemands', $selectedRoomDemands);
|
||||
}
|
||||
}
|
||||
|
||||
if (Configuration::get('PS_ALLOW_ADD_ALL_SERVICES_IN_BOOKING')) {
|
||||
// get all services
|
||||
$objProduct = new Product();
|
||||
$serviceProducts = $objProduct->getServiceProducts(true);
|
||||
} else {
|
||||
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
|
||||
$objRoomTypeServiceProductCartDetail = new RoomTypeServiceProductCartDetail();
|
||||
$roomTypeServiceProducts = $objRoomTypeServiceProduct->getServiceProductsData($idProduct, 1, 0, false, 2, null);
|
||||
if ($selectedRoomServiceProduct = $objCartBookingData->getRoomRowByIdProductIdRoomInDateRange(
|
||||
$idCart,
|
||||
$idProduct,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
$idRoom
|
||||
)) {
|
||||
$selectedRoomServiceProduct['selected_service'] = $objRoomTypeServiceProductCartDetail->getRoomServiceProducts(
|
||||
$selectedRoomServiceProduct['id'],
|
||||
0,
|
||||
null,
|
||||
null
|
||||
);
|
||||
$serviceProducts = $objRoomTypeServiceProduct->getServiceProductsData($idProduct, 1, 0, false, 2, null);
|
||||
}
|
||||
|
||||
if ($serviceProducts) {
|
||||
$objRoomTypeServPrice = new RoomTypeServiceProductPrice();
|
||||
foreach ($serviceProducts as $key => $servProduct) {
|
||||
$serviceProducts[$key]['price_tax_exc'] = $objRoomTypeServPrice->getServicePrice($servProduct['id_product'], 0, 1, null, null, false, $idCart);
|
||||
}
|
||||
$this->context->smarty->assign(array(
|
||||
'roomTypeServiceProducts' => $roomTypeServiceProducts,
|
||||
'selectedRoomServiceProduct' => $selectedRoomServiceProduct
|
||||
));
|
||||
$htlCartBoookingata = $objCartBookingData->getRoomRowByIdProductIdRoomInDateRange(
|
||||
$idCart,
|
||||
$idProduct,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
$idRoom
|
||||
}
|
||||
|
||||
if ($selectedRoomServiceProduct = $objCartBookingData->getRoomRowByIdProductIdRoomInDateRange(
|
||||
$idCart,
|
||||
$idProduct,
|
||||
$dateFrom,
|
||||
$dateTo,
|
||||
$idRoom
|
||||
)) {
|
||||
$objRoomTypeServiceProductCartDetail = new RoomTypeServiceProductCartDetail();
|
||||
$selectedRoomServiceProduct['selected_service'] = $objRoomTypeServiceProductCartDetail->getRoomServiceProducts(
|
||||
$selectedRoomServiceProduct['id'],
|
||||
0,
|
||||
null,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
$objCart = new Cart($idCart);
|
||||
$cartCurrency = new Currency($objCart->id_currency);
|
||||
$taxRulesGroups = TaxRulesGroup::getTaxRulesGroups(true);
|
||||
$this->context->smarty->assign(array(
|
||||
'taxRulesGroups' => $taxRulesGroups,
|
||||
'id_hotel_cart_booking' => $idHotelCartBooking,
|
||||
'cartCurrency' => $cartCurrency,
|
||||
'serviceProducts' => $serviceProducts,
|
||||
'selectedRoomServiceProduct' => $selectedRoomServiceProduct,
|
||||
'customServiceAllowed' => Configuration::get('PS_ALLOW_CREATE_CUSTOM_SERVICES_IN_BOOKING'),
|
||||
'loaderImg' => $this->context->link->getMediaLink(_PS_IMG_.'admin/ajax-loader.gif')
|
||||
));
|
||||
|
||||
$response['html_exta_demands'] = $this->context->smarty->fetch(
|
||||
_PS_ADMIN_DIR_.'/themes/default/template/controllers/orders/_cart_booking_demands.tpl'
|
||||
);
|
||||
} else {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Some error occurred. please try again.');
|
||||
}
|
||||
$response['status'] = true;
|
||||
$response['html_exta_demands'] = $this->context->smarty->fetch(
|
||||
_PS_ADMIN_DIR_.'/themes/default/template/controllers/orders/_cart_booking_demands.tpl'
|
||||
);
|
||||
|
||||
$this->ajaxDie(json_encode($response));
|
||||
}
|
||||
|
||||
@@ -1191,15 +1213,15 @@ class AdminCartsControllerCore extends AdminController
|
||||
|
||||
public function ajaxProcessUpdateServiceProduct()
|
||||
{
|
||||
if ($this->tabAccess['edit'] === '1') {
|
||||
if ($this->tabAccess['edit'] === '1') {
|
||||
$operator = Tools::getValue('operator', 'up');
|
||||
$idServiceProduct = Tools::getValue('id_product');
|
||||
$idCartBooking = Tools::getValue('id_cart_booking');
|
||||
$qty = Tools::getValue('qty');
|
||||
|
||||
|
||||
if (Validate::isLoadedObject($objHotelCartBookingData = new HotelCartBookingData($idCartBooking))) {
|
||||
$objRoomTypeServiceProductCartDetail = new RoomTypeServiceProductCartDetail();
|
||||
|
||||
|
||||
if ($operator == 'up') {
|
||||
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
|
||||
if ($objRoomTypeServiceProduct->isRoomTypeLinkedWithProduct($objHotelCartBookingData->id_product, $idServiceProduct)) {
|
||||
@@ -1221,7 +1243,7 @@ class AdminCartsControllerCore extends AdminController
|
||||
$this->errors[] = Tools::displayError('This Service is not available with selected room.');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (empty($this->errors)) {
|
||||
if ($objRoomTypeServiceProductCartDetail->updateCartServiceProduct(
|
||||
$idCartBooking,
|
||||
@@ -1236,7 +1258,7 @@ class AdminCartsControllerCore extends AdminController
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('Unable to update services. Please try reloading the page.');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('Room not found. Please try reloading the page.');
|
||||
@@ -1312,4 +1334,330 @@ class AdminCartsControllerCore extends AdminController
|
||||
$list = $helper->generateList($this->_list, $this->fields_list);
|
||||
return $list;
|
||||
}
|
||||
|
||||
// Add new custom services to room
|
||||
public function ajaxProcessAddNewRoomServices()
|
||||
{
|
||||
$response = array('hasError' => false);
|
||||
// Check tab access is allowed to edit
|
||||
if ($this->tabAccess['add'] == 1) {
|
||||
if (Configuration::get('PS_ALLOW_CREATE_CUSTOM_SERVICES_IN_BOOKING')) {
|
||||
$idHotelCartBooking = Tools::getValue('id_hotel_cart_booking');
|
||||
// valiadate services being added
|
||||
if (Validate::isLoadedObject($objHtlCartBooking = new HotelCartBookingData($idHotelCartBooking))) {
|
||||
$name = Tools::getValue('new_service_name');
|
||||
$price = Tools::getValue('new_service_price');
|
||||
$priceCalcMethod = Tools::getValue('new_service_price_calc_method');
|
||||
$priceAdditionType = Tools::getValue('new_service_price_addition_type');
|
||||
$productQty = Tools::getValue('new_service_qty');
|
||||
$idTaxRuleGroup = Tools::getValue('new_service_price_tax_rule_group');
|
||||
$autoAdded = Tools::getValue('new_service_auto_added');
|
||||
|
||||
// adjust values for auto added services
|
||||
if ($autoAdded) {
|
||||
$productQty = 1;
|
||||
$objRoomType = new Product($objHtlCartBooking->id_product);
|
||||
if (Validate::isLoadedObject($objTaxRuleGroup = new TaxRulesGroup($objRoomType->id_tax_rules_group))) {
|
||||
$idTaxRuleGroup = $objRoomType->id_tax_rules_group;
|
||||
}
|
||||
} else {
|
||||
$priceAdditionType = 0;
|
||||
if (empty($productQty)) {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Service quantity is required');
|
||||
} elseif (!Validate::isUnsignedInt($productQty)) {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Invalid service quantity');
|
||||
}
|
||||
}
|
||||
|
||||
// Validate service data provided
|
||||
if (empty($name)) {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Service name is required');
|
||||
} elseif (!Validate::isCatalogName($name)) {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Invalid service name');
|
||||
}
|
||||
|
||||
if (empty($price)) {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Service price is required');
|
||||
} elseif (!Validate::isPrice($price)) {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Invalid service price');
|
||||
}
|
||||
|
||||
// if no validation errors then add service
|
||||
if (!$response['hasError']) {
|
||||
// ======= START: Create Service product =========
|
||||
$objServiceProduct = new Product();
|
||||
$objServiceProduct->price_calculation_method = $priceCalcMethod;
|
||||
$objServiceProduct->service_product_type = Product::SERVICE_PRODUCT_WITH_ROOMTYPE;
|
||||
$objServiceProduct->id_category_default = Configuration::get('PS_SERVICE_CATEGORY');
|
||||
$objServiceProduct->name[Configuration::get('PS_LANG_DEFAULT')] = $name;
|
||||
$objServiceProduct->id_shop_default = Configuration::get('PS_SHOP_DEFAULT');
|
||||
$objServiceProduct->allow_multiple_quantity = !$autoAdded;
|
||||
$objServiceProduct->id_tax_rules_group = $idTaxRuleGroup;
|
||||
$objServiceProduct->price = $price;
|
||||
$objServiceProduct->wholesale_price = 0;
|
||||
$languages = Language::getLanguages(false);
|
||||
foreach ($languages as $lang) {
|
||||
$objServiceProduct->link_rewrite[$lang['id_lang']] = Tools::link_rewrite($name);
|
||||
}
|
||||
$objServiceProduct->available_for_order = true;
|
||||
$objServiceProduct->show_price = true;
|
||||
$objServiceProduct->is_virtual = true;
|
||||
$objServiceProduct->auto_add_to_cart = $autoAdded;
|
||||
$objServiceProduct->price_addition_type = $priceAdditionType;
|
||||
$objServiceProduct->booking_product = false;
|
||||
$objServiceProduct->show_at_front = false;
|
||||
$objServiceProduct->indexed = false;
|
||||
$objServiceProduct->minimal_quantity = 1;
|
||||
$objServiceProduct->active = true;
|
||||
$objServiceProduct->max_quantity = 99999;
|
||||
|
||||
// ======= Create Service product END =========
|
||||
if ($objServiceProduct->save()) {
|
||||
// If service product is create successfully the start adding the product in cart and order
|
||||
$objCart = new Cart($objHtlCartBooking->id_cart);
|
||||
$objServiceProduct = new Product($objServiceProduct->id, false, $objCart->id_lang);
|
||||
|
||||
$objRoomTypeServiceProductCartDetail = new RoomTypeServiceProductCartDetail();
|
||||
if ($objRoomTypeServiceProductCartDetail->addServiceProductInCart(
|
||||
$objServiceProduct->id,
|
||||
$productQty,
|
||||
$objCart->id,
|
||||
$objHtlCartBooking->id
|
||||
)) {
|
||||
// Lets create a specific price for the service to match the price provided by the user
|
||||
$objSpecificPrice = new SpecificPrice();
|
||||
$objSpecificPrice->id_shop = 0;
|
||||
$objSpecificPrice->id_shop_group = 0;
|
||||
$objSpecificPrice->id_cart = $objCart->id;
|
||||
$objSpecificPrice->id_currency = $objCart->id_currency;
|
||||
$objSpecificPrice->id_country = 0;
|
||||
$objSpecificPrice->id_group = 0;
|
||||
$objSpecificPrice->id_customer = $objCart->id_customer;
|
||||
$objSpecificPrice->id_product = $objServiceProduct->id;
|
||||
$objSpecificPrice->id_product_attribute = 0;
|
||||
$objSpecificPrice->price = $price;
|
||||
$objSpecificPrice->from_quantity = 1;
|
||||
$objSpecificPrice->reduction = 0;
|
||||
$objSpecificPrice->reduction_type = 'amount';
|
||||
$objSpecificPrice->reduction_tax = 0;
|
||||
$objSpecificPrice->from = '0000-00-00 00:00:00';
|
||||
$objSpecificPrice->to = '0000-00-00 00:00:00';
|
||||
if ($objSpecificPrice->add()) {
|
||||
$response['service_panel'] = $this->getBookingServicesTabContent($objHtlCartBooking->id);
|
||||
} else {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Some error occurred while adding service to the room');
|
||||
}
|
||||
} else {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Unable to add service to the room');
|
||||
}
|
||||
} else {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Unable to add service to the room');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Room not found');
|
||||
}
|
||||
} else {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Adding a new custom service is not allowed.');
|
||||
}
|
||||
} else {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('You do not have permission to edit this order.');
|
||||
}
|
||||
|
||||
$this->ajaxDie(json_encode($response));
|
||||
}
|
||||
|
||||
public function getBookingServicesTabContent($idHotelCartBooking)
|
||||
{
|
||||
$servicesTpl = '';
|
||||
if (Validate::isLoadedObject($objCartBookingData = new HotelCartBookingData($idHotelCartBooking))) {
|
||||
if (Configuration::get('PS_ALLOW_ADD_ALL_SERVICES_IN_BOOKING')) {
|
||||
// get all services
|
||||
$objProduct = new Product();
|
||||
$serviceProducts = $objProduct->getServiceProducts(true);
|
||||
} else {
|
||||
$objRoomTypeServiceProduct = new RoomTypeServiceProduct();
|
||||
$serviceProducts = $objRoomTypeServiceProduct->getServiceProductsData($objCartBookingData->id_product, 1, 0, false, 2, null);
|
||||
}
|
||||
|
||||
if ($serviceProducts) {
|
||||
foreach ($serviceProducts as $key => $servProduct) {
|
||||
$serviceProducts[$key]['price_tax_exc'] = $servProduct['price'];
|
||||
if ($additionalServices
|
||||
&& (in_array($servProduct['id_product'], array_column($additionalServices['additional_services'], 'id_product')))
|
||||
) {
|
||||
unset($serviceProducts[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($selectedRoomServiceProduct = $objCartBookingData->getRoomRowByIdProductIdRoomInDateRange(
|
||||
$objCartBookingData->id_cart,
|
||||
$objCartBookingData->id_product,
|
||||
$objCartBookingData->date_from,
|
||||
$objCartBookingData->date_to,
|
||||
$objCartBookingData->id_room
|
||||
)) {
|
||||
$objRoomTypeServiceProductCartDetail = new RoomTypeServiceProductCartDetail();
|
||||
$selectedRoomServiceProduct['selected_service'] = $objRoomTypeServiceProductCartDetail->getRoomServiceProducts(
|
||||
$selectedRoomServiceProduct['id'],
|
||||
0,
|
||||
null,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
$objCart = new Cart($objCartBookingData->id_cart);
|
||||
$cartCurrency = new Currency($objCart->id_currency);
|
||||
$taxRulesGroups = TaxRulesGroup::getTaxRulesGroups(true);
|
||||
$this->context->smarty->assign(array(
|
||||
'id_hotel_cart_booking' => $idHotelCartBooking,
|
||||
'taxRulesGroups' => $taxRulesGroups,
|
||||
'cartCurrency' => $cartCurrency,
|
||||
'serviceProducts' => $serviceProducts,
|
||||
'selectedRoomServiceProduct' => $selectedRoomServiceProduct,
|
||||
'customServiceAllowed' => Configuration::get('PS_ALLOW_CREATE_CUSTOM_SERVICES_IN_BOOKING'),
|
||||
));
|
||||
|
||||
$servicesTpl = $this->context->smarty->fetch(
|
||||
_PS_ADMIN_DIR_.'/themes/default/template/controllers/orders/modals/_add_order_extra_services_tab_content.tpl'
|
||||
);
|
||||
}
|
||||
|
||||
return $servicesTpl;
|
||||
}
|
||||
|
||||
// Process to update selected services
|
||||
public function ajaxProcessUpdateSelectedRoomServices()
|
||||
{
|
||||
$response = array('hasError' => false);
|
||||
// Check tab access is allowed to edit
|
||||
if ($this->tabAccess['add'] == 1) {
|
||||
$idCartBooking = Tools::getValue('id_hotel_cart_booking');
|
||||
if (Validate::isLoadedObject($objHotelCartBookingData = new HotelCartBookingData($idCartBooking))) {
|
||||
$objCart = new Cart($objHotelCartBookingData->id_cart);
|
||||
if ($selectedServiceProducts = Tools::getValue('selected_service_product')) {
|
||||
$serviceQuantities = Tools::getValue('service_qty');
|
||||
$serviceUnitPrices = Tools::getValue('service_price');
|
||||
// Validate selected services
|
||||
foreach ($selectedServiceProducts as $idServiceProduct => $selected) {
|
||||
if (Validate::isLoadedObject($objProduct = new Product($idServiceProduct, false, $objCart->id_lang))) {
|
||||
if ($objProduct->allow_multiple_quantity) {
|
||||
if (!isset($serviceQuantities[$idServiceProduct])) {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Quantity not provided for service').': '.$objProduct->name;
|
||||
} else if (!Validate::isUnsignedInt($serviceQuantities[$idServiceProduct])) {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Invalid quantity provided for service').': '.$objProduct->name;
|
||||
}
|
||||
} elseif ($serviceQuantities[$idServiceProduct] > 1) {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Can not order multiple quanitity for service').': '.$objProduct->name;
|
||||
}
|
||||
|
||||
if (!$objProduct->allow_multiple_quantity) {
|
||||
$serviceQuantities[$idServiceProduct] = 1;
|
||||
}
|
||||
|
||||
if (!isset($serviceUnitPrices[$idServiceProduct])
|
||||
|| !ValidateCore::isPrice($serviceUnitPrices[$idServiceProduct])
|
||||
) {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Invalid unit price for service').': '.$objProduct->name;
|
||||
}
|
||||
} else {
|
||||
$response['errors'][] = Tools::displayError('Some services not found. please try after refreshing the page');
|
||||
}
|
||||
}
|
||||
|
||||
if (!$response['hasError']) {
|
||||
$result = true;
|
||||
$objRoomTypeServiceProductCart = new RoomTypeServiceProductCartDetail();
|
||||
foreach ($selectedServiceProducts as $idServiceProduct => $selected) {
|
||||
if ($selected) {
|
||||
$operator = 'up';
|
||||
} else {
|
||||
$operator = 'down';
|
||||
}
|
||||
$quantity = $serviceQuantities[$idServiceProduct];
|
||||
$unitPrice = $serviceUnitPrices[$idServiceProduct];
|
||||
if ($result &= $objRoomTypeServiceProductCart->updateCartServiceProduct(
|
||||
$idCartBooking,
|
||||
$idServiceProduct,
|
||||
$quantity,
|
||||
$objHotelCartBookingData->id_cart,
|
||||
$operator,
|
||||
)) {
|
||||
$originalPrice = Product::getPriceStatic($idServiceProduct, false);
|
||||
// if price is different than the original service price then update the price
|
||||
if ($operator == 'up' && $originalPrice != $unitPrice) {
|
||||
if ($specificPriceInfo = SpecificPrice::getSpecificPrice(
|
||||
(int)$idServiceProduct,
|
||||
0,
|
||||
$objCart->id_currency,
|
||||
0,
|
||||
0,
|
||||
1,
|
||||
0,
|
||||
$objCart->id_customer,
|
||||
$objCart->id
|
||||
)) {
|
||||
$objSpecificPrice = new SpecificPrice($specificPriceInfo['id_specific_price']);
|
||||
} else {
|
||||
$objSpecificPrice = new SpecificPrice();
|
||||
}
|
||||
$objSpecificPrice->id_shop = 0;
|
||||
$objSpecificPrice->id_shop_group = 0;
|
||||
$objSpecificPrice->id_cart = $objCart->id;
|
||||
$objSpecificPrice->id_currency = $objCart->id_currency;
|
||||
$objSpecificPrice->id_country = 0;
|
||||
$objSpecificPrice->id_group = 0;
|
||||
$objSpecificPrice->id_customer = $objCart->id_customer;
|
||||
$objSpecificPrice->id_product = $idServiceProduct;
|
||||
$objSpecificPrice->id_product_attribute = 0;
|
||||
$objSpecificPrice->price = $unitPrice;
|
||||
$objSpecificPrice->from_quantity = 1;
|
||||
$objSpecificPrice->reduction = 0;
|
||||
$objSpecificPrice->reduction_type = 'amount';
|
||||
$objSpecificPrice->reduction_tax = 0;
|
||||
$objSpecificPrice->from = '0000-00-00 00:00:00';
|
||||
$objSpecificPrice->to = '0000-00-00 00:00:00';
|
||||
|
||||
$result &= $objSpecificPrice->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!$result) {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Error while updating services, please try again after refresing the page');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('No service found');
|
||||
}
|
||||
} else {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('Room info not found');
|
||||
}
|
||||
} else {
|
||||
$response['hasError'] = true;
|
||||
$response['errors'][] = Tools::displayError('You do not have permission to edit this order.');
|
||||
}
|
||||
|
||||
$this->ajaxDie(json_encode($response));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,7 +194,7 @@ class AdminOrderPreferencesControllerCore extends AdminController
|
||||
'type' => 'bool'
|
||||
),
|
||||
'PS_ORDER_LIST_PRICE_DISPLAY_CURRENCY' => array(
|
||||
'title' => $this->l('Display order list prices in'),
|
||||
'title' => $this->l('Display order list prices in Back Office'),
|
||||
'hint' => $this->l('Choose the currency in which you want the prices in the order list to be displayed.'),
|
||||
'desc' => $this->l('\'Order currency\' is the currency in which customer created the order and \'Default currency\' is the currency configured in localization.'),
|
||||
'validation' => 'isInt',
|
||||
@@ -219,6 +219,20 @@ class AdminOrderPreferencesControllerCore extends AdminController
|
||||
'class' => 'fixed-width-xl',
|
||||
'suffix' => $this->l('day(s)'),
|
||||
),
|
||||
'PS_ALLOW_ADD_ALL_SERVICES_IN_BOOKING' => array(
|
||||
'title' => $this->l('Allow to add all services in a booking'),
|
||||
'hint' => $this->l('Enable to allow all services created to be added in a booking while adding or editing a booking. Disable to allow only attached services with room type.'),
|
||||
'desc' => $this->l('If disabled, only attached services with room type will be available to be added to a booking.'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool'
|
||||
),
|
||||
'PS_ALLOW_CREATE_CUSTOM_SERVICES_IN_BOOKING' => array(
|
||||
'title' => $this->l('Allow to create custom service for a booking'),
|
||||
'hint' => $this->l('Enable to allow to create custom service while adding or editing a booking.'),
|
||||
'desc' => $this->l('If disabled, a custom service can not be created while adding or editing a booking.'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool'
|
||||
),
|
||||
),
|
||||
'submit' => array('title' => $this->l('Save'))
|
||||
),
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -31,6 +31,7 @@ class AdminStoresControllerCore extends AdminController
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminDashboard'));
|
||||
$this->bootstrap = true;
|
||||
$this->table = 'store';
|
||||
$this->className = 'Store';
|
||||
|
||||
@@ -281,10 +281,17 @@ class ContactControllerCore extends FrontController
|
||||
}
|
||||
$this->context->smarty->assign('customerThread', $customer_thread);
|
||||
}
|
||||
// Send Hotel location information
|
||||
$gblHtlAddress = Configuration::get('WK_HOTEL_GLOBAL_ADDRESS');
|
||||
$gblHtlPhone = Configuration::get('WK_HOTEL_GLOBAL_CONTACT_NUMBER');
|
||||
$gblHtlEmail = Configuration::get('WK_HOTEL_GLOBAL_CONTACT_EMAIL');
|
||||
|
||||
$objShop = new Shop();
|
||||
$shopAddress = '';
|
||||
$shopAddress_obj = $objShop->getAddress();
|
||||
if (isset($shopAddress_obj) && $shopAddress_obj instanceof Address) {
|
||||
$shopAddress = AddressFormat::generateAddress($shopAddress_obj, array(), ', ', ' ');
|
||||
}
|
||||
|
||||
$gblHtlAddress = $shopAddress;
|
||||
$gblHtlPhone = Configuration::get('PS_SHOP_PHONE');
|
||||
$gblHtlEmail = Configuration::get('PS_SHOP_EMAIL');
|
||||
$objHotelInfo = new HotelBranchInformation();
|
||||
if ($hotelsInfo = $objHotelInfo->hotelBranchesInfo(false, 1, 1)) {
|
||||
foreach ($hotelsInfo as &$hotel) {
|
||||
@@ -310,12 +317,15 @@ class ContactControllerCore extends FrontController
|
||||
|
||||
$contactKey = md5(uniqid(microtime(), true));
|
||||
$this->context->cookie->__set('contactFormKey', $contactKey);
|
||||
$displayHotelMap = Configuration::get('WK_DISPLAY_CONTACT_PAGE_GOOLGE_MAP');
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'hotelsInfo' => $hotelsInfo,
|
||||
'viewOnMap' => Configuration::get('WK_GOOGLE_ACTIVE_MAP'),
|
||||
'displayHotels' => Configuration::get('WK_DISPLAY_CONTACT_PAGE_HOTEL_LIST'),
|
||||
'gblHtlPhone' => $gblHtlPhone,
|
||||
'gblHtlEmail' => $gblHtlEmail,
|
||||
'displayHotelMap' => $displayHotelMap,
|
||||
'gblHtlAddress' => $gblHtlAddress,
|
||||
'contacts' => Contact::getContacts($this->context->language->id),
|
||||
'message' => html_entity_decode(Tools::getValue('message')),
|
||||
@@ -324,10 +334,9 @@ class ContactControllerCore extends FrontController
|
||||
);
|
||||
|
||||
//By webkul to send hotels Map Informations for google Map.
|
||||
if (Configuration::get('PS_API_KEY') && Configuration::get('WK_GOOGLE_ACTIVE_MAP')) {
|
||||
$hotelLocationArray = $objHotelInfo->getMapFormatHotelsInfo(Configuration::get('WK_MAP_HOTEL_ACTIVE_ONLY'));
|
||||
if ($hotelLocationArray) {
|
||||
$this->context->smarty->assign('hotelLocationArray', json_encode($hotelLocationArray));
|
||||
if ($displayHotelMap && Configuration::get('PS_API_KEY') && Configuration::get('WK_GOOGLE_ACTIVE_MAP')) {
|
||||
if ($hotelLocationArray = $objHotelInfo->getMapFormatHotelsInfo(Configuration::get('WK_MAP_HOTEL_ACTIVE_ONLY'))) {
|
||||
$this->context->smarty->assign('hotelLocationArray', str_replace(array('\n', '\r'), '', json_encode($hotelLocationArray)));
|
||||
}
|
||||
}
|
||||
//End
|
||||
|
||||
160
controllers/front/OurPropertiesController.php
Normal file
160
controllers/front/OurPropertiesController.php
Normal file
@@ -0,0 +1,160 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
class OurPropertiesControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = 'our-properties';
|
||||
|
||||
/**
|
||||
* Assign template vars related to page content
|
||||
* @see FrontController::initContent()
|
||||
*/
|
||||
public function initContent()
|
||||
{
|
||||
$this->display_column_left = false;
|
||||
$this->display_column_right = false;
|
||||
|
||||
parent::initContent();
|
||||
$hotelsInfo = array();
|
||||
$hotelLocationArray = 0;
|
||||
$pageLimit = 0;
|
||||
$displayHotelMap = Configuration::get('WK_DISPLAY_PROPERTIES_PAGE_GOOGLE_MAP');
|
||||
if (Module::isInstalled('hotelreservationsystem') && Module::isEnabled('hotelreservationsystem')) {
|
||||
$objModule = Module::getInstanceByName('hotelreservationsystem');
|
||||
$objHotelInfo = new HotelBranchInformation();
|
||||
if ($hotelsInfo = $objHotelInfo->hotelBranchesInfo(false, 1, 1)) {
|
||||
$hotelIconDefault = $this->context->link->getMediaLink($objModule->getPathUri().'views/img/Slices/hotel-default-icon.png');
|
||||
foreach ($hotelsInfo as $hotelKey => $hotel) {
|
||||
if (isset($hotel['id_cover_img'])
|
||||
&& $hotel['id_cover_img']
|
||||
&& Validate::isLoadedObject($objHotelImage = new HotelImage($hotel['id_cover_img']))
|
||||
) {
|
||||
$htlImgLink = $this->context->link->getMediaLink($objHotelImage->getImageLink($hotel['id_cover_img'], ImageType::getFormatedName('medium')));
|
||||
if ((bool)Tools::file_get_contents($htlImgLink)) {
|
||||
$hotelsInfo[$hotelKey]['image_url'] = $htlImgLink;
|
||||
} else {
|
||||
$hotelsInfo[$hotelKey]['image_url'] = $hotelIconDefault;
|
||||
}
|
||||
} else {
|
||||
$hotelsInfo[$hotelKey]['image_url'] = $hotelIconDefault;
|
||||
}
|
||||
|
||||
$hotelsInfo[$hotelKey]['view_rooms_link'] = $this->context->link->getCategoryLink(
|
||||
new Category($hotel['id_category'], $this->context->language->id),
|
||||
null,
|
||||
$this->context->language->id
|
||||
);
|
||||
}
|
||||
|
||||
// To store max number pages.
|
||||
$pageLimit = ceil(count($hotelsInfo)/10);
|
||||
if (!($page = Tools::getValue('pagination'))
|
||||
|| (!$pageLimit || ($page > $pageLimit))
|
||||
) {
|
||||
$page = 1;
|
||||
}
|
||||
|
||||
$pagination = array();
|
||||
if ($pageLimit) {
|
||||
$pageNumber = $page - 2;
|
||||
if ($pageNumber < 1) {
|
||||
$pageNumber = 1;
|
||||
}
|
||||
|
||||
while ($page + 4 >= $pageNumber && count($pagination) < 5) {
|
||||
if ($pageNumber > $pageLimit) {
|
||||
$firstItem = reset($pagination) - 1;
|
||||
if ($firstItem > 0) {
|
||||
$pagination[$firstItem] = $firstItem;
|
||||
}
|
||||
} else {
|
||||
$pagination[$pageNumber] = $pageNumber;
|
||||
}
|
||||
|
||||
$pageNumber++;
|
||||
}
|
||||
}
|
||||
|
||||
ksort($pagination);
|
||||
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'pagination' => $pagination,
|
||||
'currentPage' => $page,
|
||||
'pageLimit' => $pageLimit,
|
||||
'currentPageUrl' => $this->context->link->getPageLink($this->php_self)
|
||||
)
|
||||
);
|
||||
|
||||
$page--;
|
||||
// To show 10 Hotel per page
|
||||
$hotelsInfo = array_slice($hotelsInfo, $page * 10, 10);
|
||||
}
|
||||
|
||||
if ($displayHotelMap && Configuration::get('PS_API_KEY') && Configuration::get('WK_GOOGLE_ACTIVE_MAP')) {
|
||||
if ($hotelLocations = $objHotelInfo->getMapFormatHotelsInfo(Configuration::get('WK_MAP_HOTEL_ACTIVE_ONLY'))) {
|
||||
$hotelLocationArray = str_replace(array('\n', '\r'), '', json_encode($hotelLocations));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Media::addJsDef(
|
||||
array(
|
||||
'hotelLocationArray' => $hotelLocationArray
|
||||
)
|
||||
);
|
||||
|
||||
$this->context->smarty->assign(
|
||||
array(
|
||||
'hotelsInfo' => $hotelsInfo,
|
||||
'hotelLocationArray' => $hotelLocationArray,
|
||||
'viewOnMap' => Configuration::get('WK_GOOGLE_ACTIVE_MAP'),
|
||||
'displayHotelMap' => $displayHotelMap,
|
||||
'WK_HTL_SHORT_DESC' => Configuration::get('WK_HTL_SHORT_DESC', $this->context->language->id),
|
||||
'currentIndex' => $this->context->link->getPageLink('our-properties')
|
||||
)
|
||||
);
|
||||
|
||||
$this->setTemplate(_PS_THEME_DIR_.'our-properties.tpl');
|
||||
}
|
||||
|
||||
public function setMedia()
|
||||
{
|
||||
parent::setMedia();
|
||||
$this->addJS(_THEME_JS_DIR_.'our-properties.js');
|
||||
$this->addCSS(_THEME_CSS_DIR_.'our-properties.css');
|
||||
// GOOGLE MAP
|
||||
if (($PS_API_KEY = Configuration::get('PS_API_KEY')) && Configuration::get('WK_GOOGLE_ACTIVE_MAP')) {
|
||||
Media::addJsDef(
|
||||
array(
|
||||
'PS_STORES_ICON' => $this->context->link->getMediaLink(_PS_IMG_.Configuration::get('PS_STORES_ICON')),
|
||||
)
|
||||
);
|
||||
|
||||
$this->addJS(
|
||||
'https://maps.googleapis.com/maps/api/js?key='.$PS_API_KEY.
|
||||
'&libraries=places&language='.$this->context->language->iso_code.'®ion='.$this->context->country->iso_code
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,6 +28,11 @@ class SitemapControllerCore extends FrontController
|
||||
{
|
||||
public $php_self = 'sitemap';
|
||||
|
||||
public function init()
|
||||
{
|
||||
Tools::redirect($this->context->link->getPageLink('index'));
|
||||
}
|
||||
|
||||
public function setMedia()
|
||||
{
|
||||
parent::setMedia();
|
||||
|
||||
@@ -230,6 +230,12 @@
|
||||
<configuration id="PS_ORDER_LIST_PRICE_DISPLAY_CURRENCY" name="PS_ORDER_LIST_PRICE_DISPLAY_CURRENCY">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ALLOW_ADD_ALL_SERVICES_IN_BOOKING" name="PS_ALLOW_ADD_ALL_SERVICES_IN_BOOKING">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_ALLOW_CREATE_CUSTOM_SERVICES_IN_BOOKING" name="PS_ALLOW_CREATE_CUSTOM_SERVICES_IN_BOOKING">
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="TRACKING_DIRECT_TRAFFIC" name="TRACKING_DIRECT_TRAFFIC">
|
||||
<value>0</value>
|
||||
</configuration>
|
||||
|
||||
@@ -148,5 +148,9 @@
|
||||
<page>products-comparison</page>
|
||||
<configurable>1</configurable>
|
||||
</meta>
|
||||
<meta id="our-properties">
|
||||
<page>our-properties</page>
|
||||
<configurable>1</configurable>
|
||||
</meta>
|
||||
</entities>
|
||||
</entity_meta>
|
||||
|
||||
@@ -225,9 +225,9 @@
|
||||
<tab id="Images" id_parent="Preferences" active="1" hide_host_mode="0">
|
||||
<class_name>AdminImages</class_name>
|
||||
</tab>
|
||||
<tab id="Store_Contacts" id_parent="Preferences" active="1" hide_host_mode="0">
|
||||
<!-- <tab id="Store_Contacts" id_parent="Preferences" active="1" hide_host_mode="0">
|
||||
<class_name>AdminStores</class_name>
|
||||
</tab>
|
||||
</tab> -->
|
||||
<tab id="Search_1" id_parent="Preferences" active="1" hide_host_mode="0">
|
||||
<class_name>AdminSearchConf</class_name>
|
||||
</tab>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-follow</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Our Properties</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Credit slip</title>
|
||||
<description/>
|
||||
|
||||
@@ -126,6 +126,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-slip</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>আমাদের সম্পত্তিসমূহ</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id='order' id_shop='1'>
|
||||
<title>অর্ডার </title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>acompanhar-meu-pedido</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Nossas propriedades</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id='order-slip' id_shop='1'>
|
||||
<title>Nota do pedido</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-follow</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Naše nemovitosti</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Dobropis</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>bestellungsverfolgung</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Unsere Immobilien</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Bestellschein</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-follow</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Our Properties</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Credit slip</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>seguimiento-pedido</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Nuestras propiedades</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id='order-slip' id_shop='1'>
|
||||
<title>Albarán</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-follow</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>املاک ما</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>رسید سفارش</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>suivi-commande</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Nos propriétés</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id='order-slip' id_shop='1'>
|
||||
<title>Avoirs</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>מעקב-הזמנות</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>הנכסים שלנו</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>שוברי הזמנה</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-follow</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Our Properties</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Credit slip</title>
|
||||
<description/>
|
||||
|
||||
@@ -126,6 +126,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-slip</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Our Properties</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order" id_shop="1">
|
||||
<title>Order</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>pantau-order</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Properti kami</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id='order-slip' id_shop='1'>
|
||||
<title>Slip order</title>
|
||||
<description/>
|
||||
|
||||
@@ -125,6 +125,12 @@
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>buono-ordine</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Le nostre proprietà</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id='order' id_shop='1'>
|
||||
<title>Ordine</title>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-follow</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Our Properties</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Credit slip</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-follow</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Our Properties</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Order slip</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-follow</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Our Properties</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Order slip</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>sledzenie-zamowienia</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Nasze nieruchomości</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Pokwitowania</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>acompanhar-encomenda</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Nossas propriedades</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Nota de Encomenda</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>returnari</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Proprietățile noastre</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Bon de comandă</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-follow</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Наши объекты</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Бланк заказа</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-follow</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Our Properties</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Credit slip</title>
|
||||
<description/>
|
||||
|
||||
@@ -114,6 +114,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>my-account</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Our Properties</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-follow" id_shop="1">
|
||||
<title>Order follow</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-follow</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Our Properties</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Credit slip</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-follow</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>我們的物業</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>訂購單</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-follow</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Các bất động sản của chúng tôi</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Phiếu tín dụng</title>
|
||||
<description/>
|
||||
|
||||
@@ -120,6 +120,12 @@
|
||||
<keywords/>
|
||||
<url_rewrite>order-follow</url_rewrite>
|
||||
</meta>
|
||||
<meta id='our-properties' id_shop='1'>
|
||||
<title>Our Properties</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>our-properties</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-slip" id_shop="1">
|
||||
<title>Order slip</title>
|
||||
<description/>
|
||||
|
||||
@@ -1344,22 +1344,100 @@ $(document).ready(function() {
|
||||
$('#back_to_demands_btn').hide();
|
||||
});
|
||||
|
||||
$(document).on('click', '#btn_new_room_service', function() {
|
||||
$('.room_services_container').show();
|
||||
$('#save_service_service').show();
|
||||
$('#back_to_service_btn').show();
|
||||
$('.room_ordered_services').hide();
|
||||
$('#btn_new_room_service').hide();
|
||||
});
|
||||
// click on back button on created facilities while additional facilities edit
|
||||
$(document).on('click', '#back_to_service_btn', function() {
|
||||
$('.room_ordered_services').show();
|
||||
$('#btn_new_existing_room_service').show();
|
||||
$('#btn_new_room_service').show();
|
||||
$('.room_services_container').hide();
|
||||
$('#add_existing_room_services_form').hide();
|
||||
$('#add_new_room_services_form').hide();
|
||||
$('#save_service_service').hide();
|
||||
$('#back_to_service_btn').hide();
|
||||
});
|
||||
|
||||
// Start: New custom service oprations
|
||||
|
||||
$(document).on('click', '#btn_new_existing_room_service', function() {
|
||||
$('#add_existing_room_services_form').show();
|
||||
$('#add_new_room_services_form').hide();
|
||||
$('#save_service_service').show();
|
||||
$('#back_to_service_btn').show();
|
||||
$('.room_ordered_services').hide();
|
||||
$('#btn_new_existing_room_service').hide();
|
||||
$('#btn_new_room_service').hide();
|
||||
$('#add_new_room_services_form').hide();
|
||||
});
|
||||
|
||||
// Add new custom service: Show hide new custom service form
|
||||
$(document).on('click', '#btn_new_room_service', function() {
|
||||
$('#add_existing_room_services_form').hide();
|
||||
$('#add_new_room_services_form').show();
|
||||
$('#add_new_room_services_form').show();
|
||||
$('#back_to_service_btn').show();
|
||||
$('.room_ordered_services').hide();
|
||||
$('#btn_new_existing_room_service').hide();
|
||||
$('#btn_new_room_service').hide();
|
||||
});
|
||||
|
||||
// Add new custom service: change auto added option
|
||||
$(document).on('change', '#add_new_room_services_form input[name="new_service_auto_added"]', function() {
|
||||
var room_type_tax_rule_group_exist = $("#room_type_tax_rule_group_exist").val();
|
||||
if ($(this).val() == 1) {
|
||||
$("#new_service_price_addition_type_container").show();
|
||||
$("#new_service_qty_container").hide();
|
||||
if (room_type_tax_rule_group_exist) {
|
||||
$("#new_service_price_tax_rule_container").hide();
|
||||
}
|
||||
} else {
|
||||
$("#new_service_price_addition_type_container").hide();
|
||||
$("#new_service_qty_container").show();
|
||||
$("#new_service_price_tax_rule_container").show();
|
||||
}
|
||||
});
|
||||
|
||||
// Add new custom service to the room
|
||||
$(document).on('submit', '#add_new_room_services_form', function(e) {
|
||||
e.preventDefault();
|
||||
var form_data = new FormData(this);
|
||||
form_data.append('ajax', true);
|
||||
form_data.append('action', 'addNewRoomServices');
|
||||
|
||||
$(".loading_overlay").show();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: {
|
||||
"cache-control": "no-cache"
|
||||
},
|
||||
url: admin_order_tab_link,
|
||||
dataType: 'JSON',
|
||||
cache: false,
|
||||
data: form_data,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(jsonData) {
|
||||
if (!jsonData.hasError) {
|
||||
if (jsonData.service_panel) {
|
||||
$('#room_type_service_product_desc').replaceWith(jsonData.service_panel);
|
||||
}
|
||||
showSuccessMessage(txtExtraDemandSucc);
|
||||
} else {
|
||||
var errorHtml = error_found_txt + ':<br>';
|
||||
errorHtml += '<ol>';
|
||||
$.each(jsonData.errors, function(key, errorMsg) {
|
||||
errorHtml += '<li>' + errorMsg + '</li>';
|
||||
});
|
||||
errorHtml += '</ol>';
|
||||
showErrorMessage(errorHtml);
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
$(".loading_overlay").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// End: New custom service oprations
|
||||
|
||||
$(document).on('change', '#edit-room-booking-modal .room_ordered_services .qty', function(e) {
|
||||
let quantityInputField = this;
|
||||
let maximumQuantity = parseInt($(quantityInputField).attr('data-max-quantity'));
|
||||
@@ -1371,26 +1449,19 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('focusout', '#edit-room-booking-modal .room_ordered_services .qty', function(e) {
|
||||
updateAdditionalServices($(this).closest('tr'));
|
||||
});
|
||||
|
||||
$(document).on('focusout', '#edit-room-booking-modal .room_ordered_services .unit_price', function(e) {
|
||||
updateAdditionalServices($(this).closest('tr'));
|
||||
});
|
||||
|
||||
$(document).on('focusout', '#edit-room-booking-modal #add_room_services_form .qty', function(e) {
|
||||
$(document).on('focusout', '#edit-room-booking-modal #add_existing_room_services_form .qty', function(e) {
|
||||
var qty_wntd = $(this).val();
|
||||
if (qty_wntd == '' || !$.isNumeric(qty_wntd) || qty_wntd < 1) {
|
||||
$(this).val(1);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('submit', '#add_room_services_form', function(e) {
|
||||
// Add existing available service to the room
|
||||
$(document).on('submit', '#add_existing_room_services_form', function(e) {
|
||||
e.preventDefault();
|
||||
var form_data = new FormData(this);
|
||||
form_data.append('ajax', true);
|
||||
form_data.append('action', 'addRoomAdditionalServices');
|
||||
form_data.append('action', 'addExistingRoomServices');
|
||||
|
||||
$(".loading_overlay").show();
|
||||
$.ajax({
|
||||
@@ -1421,6 +1492,48 @@ $(document).ready(function() {
|
||||
});
|
||||
});
|
||||
|
||||
$(document).on('submit', '#update_selected_room_services_form', function(e) {
|
||||
e.preventDefault();
|
||||
var form_data = new FormData(this);
|
||||
form_data.append('ajax', true);
|
||||
form_data.append('action', 'updateSelectedRoomServices');
|
||||
|
||||
$(".loading_overlay").show();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: {
|
||||
"cache-control": "no-cache"
|
||||
},
|
||||
url: admin_order_tab_link,
|
||||
dataType: 'JSON',
|
||||
cache: false,
|
||||
data: form_data,
|
||||
processData: false,
|
||||
contentType: false,
|
||||
success: function(jsonData) {
|
||||
if (!jsonData.hasError) {
|
||||
if (jsonData.service_panel) {
|
||||
$('#room_type_service_product_desc').replaceWith(jsonData.service_panel);
|
||||
}
|
||||
showSuccessMessage(txtExtraDemandSucc);
|
||||
} else {
|
||||
if (jsonData.errors != 'undefined' && jsonData.errors.length) {
|
||||
var errorHtml = error_found_txt + ':<br>';
|
||||
errorHtml += '<ol>';
|
||||
$.each(jsonData.errors, function(key, errorMsg) {
|
||||
errorHtml += '<li>' + errorMsg + '</li>';
|
||||
});
|
||||
errorHtml += '</ol>';
|
||||
showErrorMessage(errorHtml);
|
||||
}
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
$(".loading_overlay").hide();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// save room extra demand to the order
|
||||
$(document).on('click', '#save_room_demands', function(e) {
|
||||
e.preventDefault();
|
||||
@@ -2718,56 +2831,6 @@ const RoomAllotmentCommentModal = {
|
||||
}
|
||||
};
|
||||
|
||||
function updateAdditionalServices(element)
|
||||
{
|
||||
var id_room_type_service_product_order_detail = $(element).data('id_room_type_service_product_order_detail');
|
||||
if ($(element).find('.qty').length) {
|
||||
var qty = $(element).find('.qty').val();
|
||||
if (qty == '' || !$.isNumeric(qty) || qty < 1) {
|
||||
$(element).find('.qty').val(1);
|
||||
qty = 1;
|
||||
}
|
||||
} else {
|
||||
var qty = 1;
|
||||
}
|
||||
|
||||
var unit_price = $(element).find('.unit_price').val();
|
||||
if ($.isNumeric(qty)) {
|
||||
$(".loading_overlay").show();
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: {
|
||||
"cache-control": "no-cache"
|
||||
},
|
||||
url: admin_order_tab_link,
|
||||
dataType: 'JSON',
|
||||
cache: false,
|
||||
data: {
|
||||
id_room_type_service_product_order_detail: id_room_type_service_product_order_detail,
|
||||
qty: qty,
|
||||
unit_price: unit_price,
|
||||
action: 'updateRoomAdditionalServices',
|
||||
ajax: true
|
||||
},
|
||||
success: function(jsonData) {
|
||||
if (!jsonData.hasError) {
|
||||
if (jsonData.service_panel) {
|
||||
$('#room_type_service_product_desc').replaceWith(jsonData.service_panel);
|
||||
}
|
||||
showSuccessMessage(txtExtraDemandSucc);
|
||||
} else {
|
||||
showErrorMessage(jsonData.errors);
|
||||
|
||||
}
|
||||
},
|
||||
complete: function() {
|
||||
$(".loading_overlay").hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function updateRoomDemand(element)
|
||||
{
|
||||
var id_booking_demand = $(element).data('id_booking_demand');
|
||||
|
||||
@@ -149,21 +149,6 @@ class WkCustomNavigationLink extends ObjectModel
|
||||
|
||||
public function insertDemoData($populateData = null)
|
||||
{
|
||||
//insert home link to the list
|
||||
$languages = Language::getLanguages(false);
|
||||
$objCustomNavigationLink = new WkCustomNavigationLink();
|
||||
foreach ($languages as $language) {
|
||||
$objCustomNavigationLink->name[$language['id_lang']] = 'Home';
|
||||
}
|
||||
$objCustomNavigationLink->position = $this->getHigherPosition();
|
||||
$objCustomNavigationLink->id_cms = 0;
|
||||
$objCustomNavigationLink->show_at_navigation = 1;
|
||||
$objCustomNavigationLink->show_at_footer = 0;
|
||||
$objCustomNavigationLink->active = 1;
|
||||
$objCustomNavigationLink->is_custom_link = 0;
|
||||
$objCustomNavigationLink->link = 'index';
|
||||
$objCustomNavigationLink->save();
|
||||
|
||||
// enter modules links
|
||||
$modsElems = array();
|
||||
// if module is installing or resetting
|
||||
@@ -190,51 +175,86 @@ class WkCustomNavigationLink extends ObjectModel
|
||||
}
|
||||
}
|
||||
|
||||
//insert home link to the list
|
||||
$languages = Language::getLanguages(false);
|
||||
$https_link = (Tools::usingSecureMode() && Configuration::get('PS_SSL_ENABLED')) ? 'https://' : 'http://';
|
||||
$objLink = new Link($https_link, $https_link);
|
||||
|
||||
$navigationLinks = array(
|
||||
array(
|
||||
'name' => 'Home',
|
||||
'id_cms' => 0,
|
||||
'show_at_navigation' => 1,
|
||||
'show_at_footer' => 0,
|
||||
'is_custom_link' => 0,
|
||||
'link' => 'index',
|
||||
),
|
||||
array(
|
||||
'name' => 'Our Properties',
|
||||
'id_cms' => 0,
|
||||
'show_at_navigation' => 1,
|
||||
'show_at_footer' => 0,
|
||||
'is_custom_link' => 1,
|
||||
'link' => $objLink->getPageLink('our-properties'),
|
||||
),
|
||||
);
|
||||
|
||||
if ($modsElems) {
|
||||
$indexLink = Context::getContext()->shop->getBaseURI();
|
||||
foreach ($modsElems as $name => $modElm) {
|
||||
$objCustomNavigationLink = new WkCustomNavigationLink();
|
||||
foreach ($languages as $language) {
|
||||
$objCustomNavigationLink->name[$language['id_lang']] = $name;
|
||||
}
|
||||
$objCustomNavigationLink->position = $this->getHigherPosition();
|
||||
$objCustomNavigationLink->id_cms = 0;
|
||||
$objCustomNavigationLink->show_at_navigation = 1;
|
||||
$objCustomNavigationLink->show_at_footer = 0;
|
||||
$objCustomNavigationLink->active = 1;
|
||||
$objCustomNavigationLink->link = $indexLink.'#'.$modElm;
|
||||
$objCustomNavigationLink->is_custom_link = 1;
|
||||
$objCustomNavigationLink->save();
|
||||
$navigationLinks[] = array(
|
||||
'name' => $name,
|
||||
'id_cms' => 0,
|
||||
'show_at_navigation' => 1,
|
||||
'show_at_footer' => 0,
|
||||
'is_custom_link' => 1,
|
||||
'link' => $indexLink.'#'.$modElm
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// enter CMS pages data
|
||||
if ($cmsPagesCMS = CMS::getCMSPages(Configuration::get('PS_LANG_DEFAULT'), 1)) {
|
||||
$showAtNavigation = 0;
|
||||
foreach ($cmsPagesCMS as $cmsPage) {
|
||||
$objCustomNavigationLink = new WkCustomNavigationLink();
|
||||
$objCustomNavigationLink->position = $this->getHigherPosition();
|
||||
$objCustomNavigationLink->id_cms = $cmsPage['id_cms'];
|
||||
$objCustomNavigationLink->show_at_navigation = $showAtNavigation;
|
||||
$objCustomNavigationLink->show_at_footer = 1;
|
||||
$objCustomNavigationLink->active = 1;
|
||||
$objCustomNavigationLink->is_custom_link = 0;
|
||||
$objCustomNavigationLink->save();
|
||||
$navigationLinks[] = array(
|
||||
'id_cms' => $cmsPage['id_cms'],
|
||||
'show_at_navigation' => $showAtNavigation,
|
||||
'show_at_footer' => 1,
|
||||
'is_custom_link' => 0,
|
||||
);
|
||||
$showAtNavigation = !$showAtNavigation;
|
||||
}
|
||||
}
|
||||
//insert contact link to the list
|
||||
$objCustomNavigationLink = new WkCustomNavigationLink();
|
||||
foreach ($languages as $language) {
|
||||
$objCustomNavigationLink->name[$language['id_lang']] = 'Contact Us';
|
||||
|
||||
$navigationLinks[] = array(
|
||||
'name' => 'Contact Us',
|
||||
'id_cms' => 0,
|
||||
'show_at_navigation' => 1,
|
||||
'show_at_footer' => 0,
|
||||
'is_custom_link' => 0,
|
||||
'link' => 'contact',
|
||||
);
|
||||
foreach ($navigationLinks as $navigationLink) {
|
||||
$objCustomNavigationLink = new WkCustomNavigationLink();
|
||||
if (isset($navigationLink['name'])) {
|
||||
foreach ($languages as $language) {
|
||||
$objCustomNavigationLink->name[$language['id_lang']] = $navigationLink['name'];
|
||||
}
|
||||
}
|
||||
|
||||
$objCustomNavigationLink->position = $this->getHigherPosition();
|
||||
$objCustomNavigationLink->id_cms = $navigationLink['id_cms'];
|
||||
$objCustomNavigationLink->show_at_navigation = $navigationLink['show_at_navigation'];
|
||||
$objCustomNavigationLink->show_at_footer = $navigationLink['show_at_footer'];
|
||||
$objCustomNavigationLink->active = 1;
|
||||
if (isset($navigationLink['link'])) {
|
||||
$objCustomNavigationLink->link = $navigationLink['link'];
|
||||
}
|
||||
|
||||
$objCustomNavigationLink->is_custom_link = $navigationLink['is_custom_link'];
|
||||
$objCustomNavigationLink->save();
|
||||
}
|
||||
$objCustomNavigationLink->position = $this->getHigherPosition();
|
||||
$objCustomNavigationLink->id_cms = 0;
|
||||
$objCustomNavigationLink->show_at_navigation = 1;
|
||||
$objCustomNavigationLink->show_at_footer = 0;
|
||||
$objCustomNavigationLink->active = 1;
|
||||
$objCustomNavigationLink->is_custom_link = 0;
|
||||
$objCustomNavigationLink->link = 'contact';
|
||||
$objCustomNavigationLink->save();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ class BlockSocial extends Module
|
||||
|| !Configuration::updateValue('BLOCKSOCIAL_PINTEREST', '')
|
||||
|| !Configuration::updateValue('BLOCKSOCIAL_VIMEO', '')
|
||||
|| !Configuration::updateValue('BLOCKSOCIAL_INSTAGRAM', '')
|
||||
|| !$this->registerHook('displayFooterNotificationHook')
|
||||
|| !$this->registerHook('displayFooterMostLeftBlock')
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
@@ -100,7 +100,7 @@ class BlockSocial extends Module
|
||||
return $output.$this->renderForm();
|
||||
}
|
||||
|
||||
public function hookDisplayFooterNotificationHook()
|
||||
public function hookDisplayFooterMostLeftBlock()
|
||||
{
|
||||
$this->smarty->assign(array(
|
||||
'facebook_url' => Configuration::get('BLOCKSOCIAL_FACEBOOK'),
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
<ul class="nav nav-pills nav-stacked visible-xs wk-nav-style">
|
||||
{if $logged}
|
||||
<li>
|
||||
<a class="navigation-link" href="{$link->getPageLink('history', true)|escape:'html'}" title="{l s='View my orders' mod='blockuserinfo'}">{l s='Booking History' mod='blockuserinfo'}</a>
|
||||
<a class="navigation-link" href="{$link->getPageLink('history', true)|escape:'html'}" title="{l s='Bookings' mod='blockuserinfo'}">{l s='Bookings' mod='blockuserinfo'}</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="navigation-link" href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='View my customer account' mod='blockuserinfo'}">{l s='Accounts Settings' mod='blockuserinfo'}</a>
|
||||
|
||||
@@ -32,19 +32,19 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="user_info_acc">
|
||||
<li><a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='View my customer account' mod='blockuserinfo'}">{l s='Accounts' mod='blockuserinfo'}</a></li>
|
||||
<li><a href="{$link->getPageLink('history', true)|escape:'html'}" title="{l s='View my orders' mod='blockuserinfo'}">{l s='Orders'}</a></li>
|
||||
<li><a href="{$link->getPageLink('history', true)|escape:'html'}" title="{l s='Bookings' mod='blockuserinfo'}">{l s='Bookings' mod='blockuserinfo'}</a></li>
|
||||
<li><a href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html'}" title="{l s='Log me out' mod='blockuserinfo'}">{l s='Logout'}</a></li>
|
||||
{block name='displayUserNavigationList'}
|
||||
{hook h='displayUserNavigationList'}
|
||||
{/block}
|
||||
</ul>
|
||||
</li>
|
||||
{else}
|
||||
<a class="header-top-link" href="{$link->getPageLink('my-account', true)|escape:'html'}" rel="nofollow" title="{l s='Log in to your customer account' mod='blockuserinfo'}">
|
||||
<span class="hide_xs">{l s='Sign in' mod='blockuserinfo'}</span>
|
||||
<span class="visi_xs"><i class="icon-user"></i></span>
|
||||
</a>
|
||||
</ul>
|
||||
{else}
|
||||
<a class="header-top-link" href="{$link->getPageLink('my-account', true)|escape:'html'}" rel="nofollow" title="{l s='Log in to your customer account' mod='blockuserinfo'}">
|
||||
<span class="hide_xs">{l s='Sign in' mod='blockuserinfo'}</span>
|
||||
<span class="visi_xs"><i class="icon-user"></i></span>
|
||||
</a>
|
||||
{/if}
|
||||
{if !isset($ajaxCustomerLogin)}
|
||||
</div>
|
||||
|
||||
@@ -35,6 +35,7 @@ class HotelBranchInformation extends ObjectModel
|
||||
public $map_formated_address;
|
||||
public $map_input_text;
|
||||
public $active_refund;
|
||||
public $fax;
|
||||
public $date_add;
|
||||
public $date_upd;
|
||||
|
||||
@@ -54,6 +55,7 @@ class HotelBranchInformation extends ObjectModel
|
||||
'map_formated_address' => array('type' => self::TYPE_HTML, 'validate' => 'isCleanHtml'),
|
||||
'map_input_text' => array('type' => self::TYPE_STRING, 'validate' => 'isString'),
|
||||
'active_refund' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'),
|
||||
'fax' => array('type' => self::TYPE_STRING, 'validate' => 'isGenericName'),
|
||||
'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false),
|
||||
'date_upd' => array('type' => self::TYPE_DATE, 'validate' => 'isDate', 'copy_post' => false),
|
||||
|
||||
@@ -1161,6 +1163,8 @@ class HotelBranchInformation extends ObjectModel
|
||||
$message = sprintf(Tools::displayError('The Zip/Postal code you have entered is invalid. It must follow this format: %s'), str_replace('C', $objCountry->iso_code, str_replace('N', '0', str_replace('L', 'A', $objCountry->zip_code_format))));
|
||||
} elseif ($this->zipcode && !Validate::isPostCode($this->zipcode)) {
|
||||
$message = Tools::displayError('The Zip / Postal code is invalid.');
|
||||
} elseif ($this->fax && !Validate::isGenericName($this->fax)) {
|
||||
$message = Tools::displayError('The Fax is invalid.');
|
||||
} else {
|
||||
if ($addressValidation = Address::getValidationRules('Address')) {
|
||||
foreach ($addressValidation['size'] as $field => $maxSize) {
|
||||
|
||||
@@ -930,7 +930,7 @@ class HotelCartBookingData extends ObjectModel
|
||||
}
|
||||
|
||||
// validate cart data if not available then remove from cart
|
||||
public static function validateCartBookings()
|
||||
public static function validateCartBookings($checkServiceRoomLink = true)
|
||||
{
|
||||
$context = Context::getContext();
|
||||
$errors = array();
|
||||
@@ -966,7 +966,7 @@ class HotelCartBookingData extends ObjectModel
|
||||
} else {
|
||||
if (!$product->active) {
|
||||
$objRoomTypeServiceProductCartDetail->removeServiceProductByIdHtlCartBooking($service['htl_cart_booking_id'], $service['id_product']);
|
||||
} else {
|
||||
} elseif ($checkServiceRoomLink) {
|
||||
if (!$objRoomTypeServiceProduct->isRoomTypeLinkedWithProduct($service['id_product_room_type'], $service['id_product'])) {
|
||||
$objRoomTypeServiceProductCartDetail->removeServiceProductByIdHtlCartBooking($service['htl_cart_booking_id'], $service['id_product']);
|
||||
}
|
||||
|
||||
@@ -1044,14 +1044,13 @@ class HotelHelper
|
||||
Configuration::updateValue('WK_ROOM_LEFT_WARNING_NUMBER', 10);
|
||||
Configuration::updateValue('WK_HTL_ESTABLISHMENT_YEAR', 2010);
|
||||
|
||||
Configuration::updateValue(
|
||||
'WK_HOTEL_GLOBAL_ADDRESS',
|
||||
'The Hotel Prime, Monticello Dr, Montgomery, 10010'
|
||||
);
|
||||
Configuration::updateValue('WK_HOTEL_GLOBAL_CONTACT_NUMBER', '0987654321');
|
||||
Configuration::updateValue('WK_HOTEL_GLOBAL_CONTACT_EMAIL', 'hotelprime@htl.com');
|
||||
Configuration::updateValue('PS_SHOP_ADDR1', 'The Hotel Prime, Monticello Dr, Montgomery, 10010');
|
||||
Configuration::updateValue('PS_SHOP_PHONE', '0987654321');
|
||||
Configuration::updateValue('PS_SHOP_EMAIL', 'hotelprime@htl.com');
|
||||
|
||||
Configuration::updateValue('WK_CUSTOMER_SUPPORT_PHONE_NUMBER', '0987654321');
|
||||
Configuration::updateValue('WK_CUSTOMER_SUPPORT_EMAIL', 'hotelprime@htl.com');
|
||||
Configuration::updateValue('WK_DISPLAY_CONTACT_PAGE_HOTEL_LIST', 0);
|
||||
|
||||
Configuration::updateValue('WK_TITLE_HEADER_BLOCK', $home_banner_default_title);
|
||||
Configuration::updateValue('WK_CONTENT_HEADER_BLOCK', $home_banner_default_content);
|
||||
|
||||
@@ -65,6 +65,7 @@ class HotelReservationSystemDb
|
||||
`map_formated_address` text NOT NULL,
|
||||
`map_input_text` text NOT NULL,
|
||||
`active_refund` tinyint(1) unsigned NOT NULL DEFAULT '0',
|
||||
`fax` varchar(255) DEFAULT NULL,
|
||||
`date_add` datetime NOT NULL,
|
||||
`date_upd` datetime NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
@@ -563,4 +564,4 @@ class HotelReservationSystemDb
|
||||
`'._DB_PREFIX_.'htl_access`'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,8 +171,9 @@ class RoomTypeServiceProduct extends ObjectModel
|
||||
|
||||
public function getServiceProductsData($idProductRoomType, $p = 1, $n = 0, $front = false, $available_for_order = 2, $auto_add_to_cart = 0, $subCategory = false, $idLang = false)
|
||||
{
|
||||
$context = Context::getContext();
|
||||
if (!$idLang) {
|
||||
$idLang = Context::getContext()->language->id;
|
||||
$idLang = $context->language->id;
|
||||
}
|
||||
$objProduct = new Product($idProductRoomType);
|
||||
if ($serviceProducts = $objProduct->getProductServiceProducts(
|
||||
@@ -195,7 +196,8 @@ class RoomTypeServiceProduct extends ObjectModel
|
||||
1,
|
||||
null,
|
||||
null,
|
||||
false
|
||||
false,
|
||||
$context->cart->id
|
||||
);
|
||||
|
||||
$serviceProduct['price_tax_incl'] = $objRoomTypeServiceProductPrice->getServicePrice(
|
||||
@@ -204,7 +206,8 @@ class RoomTypeServiceProduct extends ObjectModel
|
||||
1,
|
||||
null,
|
||||
null,
|
||||
true
|
||||
true,
|
||||
$context->cart->id
|
||||
);
|
||||
$useTax = Product::$_taxCalculationMethod == PS_TAX_EXC ? false : true;
|
||||
$serviceProduct['price_without_reduction'] = $objRoomTypeServiceProductPrice->getServicePrice(
|
||||
@@ -213,7 +216,8 @@ class RoomTypeServiceProduct extends ObjectModel
|
||||
1,
|
||||
null,
|
||||
null,
|
||||
$useTax
|
||||
$useTax,
|
||||
$context->cart->id
|
||||
);
|
||||
$serviceProduct['images'] = Image::getImages((int)Context::getContext()->language->id, $serviceProduct['id_product']);
|
||||
}
|
||||
|
||||
@@ -300,7 +300,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
|
||||
$product['date_from'],
|
||||
$product['date_to'],
|
||||
$useTax,
|
||||
false,
|
||||
$idCart,
|
||||
$id_address
|
||||
);
|
||||
|
||||
@@ -317,7 +317,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
|
||||
$product['date_from'],
|
||||
$product['date_to'],
|
||||
$useTax,
|
||||
false,
|
||||
$idCart,
|
||||
$id_address
|
||||
);
|
||||
|
||||
@@ -328,7 +328,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
|
||||
$product['date_from'],
|
||||
$product['date_to'],
|
||||
false,
|
||||
false,
|
||||
$idCart,
|
||||
$id_address
|
||||
);
|
||||
|
||||
@@ -339,7 +339,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
|
||||
$product['date_from'],
|
||||
$product['date_to'],
|
||||
true,
|
||||
false,
|
||||
$idCart,
|
||||
$id_address
|
||||
);
|
||||
$selectedServiceProducts[$product['htl_cart_booking_id']]['selected_products_info'][$product['id_product']] = array(
|
||||
@@ -358,7 +358,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
|
||||
$product['date_from'],
|
||||
$product['date_to'],
|
||||
false,
|
||||
false,
|
||||
$idCart,
|
||||
$id_address
|
||||
) / $numdays),
|
||||
'unit_price_tax_incl' => ($objRoomTypeServiceProductPrice->getServicePrice(
|
||||
@@ -368,7 +368,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
|
||||
$product['date_from'],
|
||||
$product['date_to'],
|
||||
true,
|
||||
false,
|
||||
$idCart,
|
||||
$id_address
|
||||
) / $numdays),
|
||||
'total_price' => $servicePrice,
|
||||
@@ -400,7 +400,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
|
||||
$product['date_from'],
|
||||
$product['date_to'],
|
||||
$useTax,
|
||||
false,
|
||||
$idCart,
|
||||
$id_address
|
||||
);
|
||||
|
||||
@@ -411,7 +411,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
|
||||
$product['date_from'],
|
||||
$product['date_to'],
|
||||
false,
|
||||
false,
|
||||
$idCart,
|
||||
$id_address
|
||||
);
|
||||
|
||||
@@ -422,7 +422,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
|
||||
$product['date_from'],
|
||||
$product['date_to'],
|
||||
true,
|
||||
false,
|
||||
$idCart,
|
||||
$id_address
|
||||
);
|
||||
if ($idProduct) {
|
||||
@@ -440,7 +440,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
|
||||
$product['date_from'],
|
||||
$product['date_to'],
|
||||
false,
|
||||
false,
|
||||
$idCart,
|
||||
$id_address
|
||||
) / $numdays;
|
||||
$selectedServiceProducts[$product['htl_cart_booking_id']]['unit_price_tax_incl'] = $objRoomTypeServiceProductPrice->getServicePrice(
|
||||
@@ -450,7 +450,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
|
||||
$product['date_from'],
|
||||
$product['date_to'],
|
||||
true,
|
||||
false,
|
||||
$idCart,
|
||||
$id_address
|
||||
) / $numdays;
|
||||
$selectedServiceProducts[$product['htl_cart_booking_id']]['total_price'] = $servicePrice;
|
||||
@@ -473,7 +473,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
|
||||
null,
|
||||
null,
|
||||
false,
|
||||
false,
|
||||
$idCart,
|
||||
$id_address
|
||||
) / $numdays),
|
||||
'unit_price_tax_incl' => ($objRoomTypeServiceProductPrice->getServicePrice(
|
||||
@@ -483,7 +483,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
|
||||
null,
|
||||
null,
|
||||
true,
|
||||
false,
|
||||
$idCart,
|
||||
$id_address
|
||||
) / $numdays),
|
||||
'total_price' => $servicePrice,
|
||||
@@ -505,6 +505,7 @@ class RoomTypeServiceProductCartDetail extends ObjectModel
|
||||
if ($getTotalPrice) {
|
||||
return $totalPrice;
|
||||
}
|
||||
|
||||
return $selectedServiceProducts;
|
||||
}
|
||||
|
||||
|
||||
@@ -254,6 +254,7 @@ class AdminAddHotelController extends ModuleAdminController
|
||||
$zipcode = Tools::getValue('hotel_postal_code');
|
||||
$address = Tools::getValue('address');
|
||||
$active = Tools::getValue('ENABLE_HOTEL');
|
||||
$fax = Tools::getValue('fax');
|
||||
$activeRefund = Tools::getValue('active_refund');
|
||||
$enableUseGlobalMaxCheckoutOffset = Tools::getValue('enable_use_global_max_checkout_offset');
|
||||
$maxCheckoutOffset = trim(Tools::getValue('max_checkout_offset'));
|
||||
@@ -380,6 +381,10 @@ class AdminAddHotelController extends ModuleAdminController
|
||||
$this->errors[] = $this->l('Address is required field.');
|
||||
}
|
||||
|
||||
if ($fax && !Validate::isGenericName($fax)) {
|
||||
$this->errors[] = $this->l('Field fax in invalid.');
|
||||
}
|
||||
|
||||
if (!$country) {
|
||||
$this->errors[] = $this->l('Country is required field.');
|
||||
} else {
|
||||
@@ -494,6 +499,7 @@ class AdminAddHotelController extends ModuleAdminController
|
||||
}
|
||||
$objHotelBranch->active = $active;
|
||||
$objHotelBranch->active_refund = $activeRefund;
|
||||
$objHotelBranch->fax = $fax;
|
||||
|
||||
// lang fields
|
||||
$hotelCatName = array();
|
||||
|
||||
@@ -40,6 +40,17 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController
|
||||
}
|
||||
$hotelNameDisable = (count($hotelsInfo) > 1 ? true : false);
|
||||
$locationDisable = ((count($hotelsInfo) < 2) && !Configuration::get('WK_HOTEL_NAME_ENABLE')) ? true : false;
|
||||
|
||||
$countryList = array();
|
||||
$countryList[] = array('id' => '0', 'name' => $this->l('Choose your country'));
|
||||
foreach (Country::getCountries($this->context->language->id) as $country) {
|
||||
$countryList[] = array('id' => $country['id_country'], 'name' => $country['name']);
|
||||
}
|
||||
$stateList = array();
|
||||
$stateList[] = array('id' => '0', 'name' => $this->l('Choose your state (if applicable)'));
|
||||
foreach (State::getStates($this->context->language->id) as $state) {
|
||||
$stateList[] = array('id' => $state['id_state'], 'name' => $state['name']);
|
||||
}
|
||||
$this->fields_options = array(
|
||||
'hotelsearchpanel' => array(
|
||||
'icon' => 'icon-search',
|
||||
@@ -78,8 +89,7 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController
|
||||
'value' => 0,
|
||||
),
|
||||
),
|
||||
'hint' => $this->l('This option can be disabled if only one active hotel in the website.
|
||||
In case of more than one active hotel, Hotel Name will always be shown in the search panel.'),
|
||||
'hint' => $this->l('This option can be disabled if only one active hotel in the website. In case of more than one active hotel, Hotel Name will always be shown in the search panel.'),
|
||||
),
|
||||
'WK_SEARCH_AUTO_FOCUS_NEXT_FIELD' => array(
|
||||
'title' => $this->l('Focus next field automatically'),
|
||||
@@ -162,36 +172,47 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController
|
||||
'name' => 'WK_HOTEL_HEADER_IMAGE',
|
||||
'url' => _PS_IMG_,
|
||||
),
|
||||
'WK_DISPLAY_PROPERTIES_LINK_IN_HEADER' => array(
|
||||
'title' => $this->l('Display Our Properties link in Header'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool',
|
||||
'default' => '0',
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'active_on',
|
||||
'value' => 1,
|
||||
),
|
||||
array(
|
||||
'id' => 'active_off',
|
||||
'value' => 0,
|
||||
),
|
||||
),
|
||||
'hint' => $this->l('Display Our Properties link in header in the front office'),
|
||||
),
|
||||
'WK_DISPLAY_CONTACT_PAGE_HOTEL_LIST' => array(
|
||||
'title' => $this->l('Display Contact Page Hotel List'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool',
|
||||
'default' => '0',
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'active_on',
|
||||
'value' => 1,
|
||||
),
|
||||
array(
|
||||
'id' => 'active_off',
|
||||
'value' => 0,
|
||||
),
|
||||
),
|
||||
'hint' => $this->l('Enable to display hotels list on the contact us page.'),
|
||||
),
|
||||
),
|
||||
'submit' => array('title' => $this->l('Save')),
|
||||
),
|
||||
'contactdetail' => array(
|
||||
'icon' => 'icon-phone',
|
||||
'title' => $this->l('Website Contact Details'),
|
||||
'title' => $this->l('Support Contact Details'),
|
||||
'fields' => array(
|
||||
'WK_HOTEL_GLOBAL_ADDRESS' => array(
|
||||
'title' => $this->l('Main Branch Address'),
|
||||
'hint' => $this->l('The address of the main branch. It will be shown on Contact Us page.'),
|
||||
'type' => 'text',
|
||||
'isCleanHtml' => true,
|
||||
'class' => 'fixed-width-xxl',
|
||||
'required' => true,
|
||||
),
|
||||
'WK_HOTEL_GLOBAL_CONTACT_NUMBER' => array(
|
||||
'title' => $this->l('Main Branch Phone Number'),
|
||||
'hint' => $this->l('The phone number of the main branch. It will be shown on Contact Us page.'),
|
||||
'type' => 'text',
|
||||
'validation' => 'isPhoneNumber',
|
||||
'class' => 'fixed-width-xxl',
|
||||
'required' => true,
|
||||
),
|
||||
'WK_HOTEL_GLOBAL_CONTACT_EMAIL' => array(
|
||||
'title' => $this->l('Main Branch Email'),
|
||||
'hint' => $this->l('The email address of the main branch. It will be shown on Contact Us page.'),
|
||||
'type' => 'text',
|
||||
'class' => 'fixed-width-xxl',
|
||||
'required' => true,
|
||||
),
|
||||
'WK_CUSTOMER_SUPPORT_PHONE_NUMBER' => array(
|
||||
'title' => $this->l('Support Phone Number'),
|
||||
'type' => 'text',
|
||||
@@ -209,6 +230,90 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController
|
||||
'title' => $this->l('Save'),
|
||||
),
|
||||
),
|
||||
'websitedetail' => array(
|
||||
'title' => $this->l('Website Contact Details'),
|
||||
'icon' => 'icon-user',
|
||||
'fields' => array(
|
||||
'PS_SHOP_NAME' => array(
|
||||
'title' => $this->l('Website name'),
|
||||
'hint' => $this->l('Displayed in emails and page titles.'),
|
||||
'validation' => 'isGenericName',
|
||||
'required' => true,
|
||||
'type' => 'text',
|
||||
'no_escape' => true,
|
||||
),
|
||||
'PS_SHOP_EMAIL' => array(
|
||||
'title' => $this->l('Website email'),
|
||||
'hint' => $this->l('Displayed in emails sent to customers and on Contact Us page.'),
|
||||
'validation' => 'isEmail',
|
||||
'required' => true,
|
||||
'type' => 'text'
|
||||
),
|
||||
'PS_SHOP_PHONE' => array(
|
||||
'title' => $this->l('Phone'),
|
||||
'validation' => 'isGenericName',
|
||||
'required' => true,
|
||||
'type' => 'text',
|
||||
'hint' => $this->l('The phone number of the main branch.'),
|
||||
),
|
||||
'PS_SHOP_ADDR1' => array(
|
||||
'title' => $this->l('Address line 1'),
|
||||
'validation' => 'isAddress',
|
||||
'type' => 'text',
|
||||
'hint' => $this->l('The address of the main branch.'),
|
||||
'isCleanHtml' => true,
|
||||
'required' => true,
|
||||
),
|
||||
'PS_SHOP_ADDR2' => array(
|
||||
'title' => $this->l('Address line 2'),
|
||||
'validation' => 'isAddress',
|
||||
'type' => 'text'
|
||||
),
|
||||
'PS_SHOP_CODE' => array(
|
||||
'title' => $this->l('Zip/postal code'),
|
||||
'validation' => 'isGenericName',
|
||||
'type' => 'text'
|
||||
),
|
||||
'PS_SHOP_CITY' => array(
|
||||
'title' => $this->l('City'),
|
||||
'validation' => 'isGenericName',
|
||||
'type' => 'text'
|
||||
),
|
||||
'PS_SHOP_COUNTRY_ID' => array(
|
||||
'title' => $this->l('Country'),
|
||||
'validation' => 'isInt',
|
||||
'type' => 'select',
|
||||
'list' => $countryList,
|
||||
'identifier' => 'id',
|
||||
'cast' => 'intval',
|
||||
'defaultValue' => (int)$this->context->country->id
|
||||
),
|
||||
'PS_SHOP_STATE_ID' => array(
|
||||
'title' => $this->l('State'),
|
||||
'validation' => 'isInt',
|
||||
'type' => 'select',
|
||||
'list' => $stateList,
|
||||
'identifier' => 'id',
|
||||
'cast' => 'intval'
|
||||
),
|
||||
'PS_SHOP_DETAILS' => array(
|
||||
'title' => $this->l('Registration number'),
|
||||
'hint' => $this->l('Website registration information (e.g. SIRET or RCS).'),
|
||||
'validation' => 'isGenericName',
|
||||
'type' => 'textarea',
|
||||
'cols' => 30,
|
||||
'rows' => 5
|
||||
),
|
||||
'PS_SHOP_FAX' => array(
|
||||
'title' => $this->l('Fax'),
|
||||
'validation' => 'isGenericName',
|
||||
'type' => 'text'
|
||||
),
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l('Save'),
|
||||
),
|
||||
),
|
||||
'advancedPayment' => array(
|
||||
'title' => $this->l('Advance Payment Global Setting'),
|
||||
'fields' => array(
|
||||
@@ -326,13 +431,82 @@ 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'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool',
|
||||
'default' => '0',
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'active_on',
|
||||
'value' => 1,
|
||||
),
|
||||
array(
|
||||
'id' => 'active_off',
|
||||
'value' => 0,
|
||||
),
|
||||
),
|
||||
'hint' => $this->l('Enable to display map with hotels locations on the our properties page.'),
|
||||
),
|
||||
'WK_DISPLAY_CONTACT_PAGE_GOOLGE_MAP' => array(
|
||||
'title' => $this->l('Display Contact Us page Google map'),
|
||||
'cast' => 'intval',
|
||||
'type' => 'bool',
|
||||
'default' => '0',
|
||||
'values' => array(
|
||||
array(
|
||||
'id' => 'active_on',
|
||||
'value' => 1,
|
||||
),
|
||||
array(
|
||||
'id' => 'active_off',
|
||||
'value' => 0,
|
||||
),
|
||||
),
|
||||
'hint' => $this->l('Enable to display map with hotels locations on the contact us page.'),
|
||||
),
|
||||
),
|
||||
'submit' => array(
|
||||
'title' => $this->l('Save'),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
public function beforeUpdateOptions()
|
||||
{
|
||||
if (isset($_POST['PS_SHOP_STATE_ID']) && $_POST['PS_SHOP_STATE_ID'] != '0') {
|
||||
$sql = 'SELECT `active` FROM `'._DB_PREFIX_.'state`
|
||||
WHERE `id_country` = '.(int)Tools::getValue('PS_SHOP_COUNTRY_ID').'
|
||||
AND `id_state` = '.(int)Tools::getValue('PS_SHOP_STATE_ID');
|
||||
$isStateOk = Db::getInstance()->getValue($sql);
|
||||
if ($isStateOk != 1) {
|
||||
$this->errors[] = Tools::displayError('The specified state is not located in this country.');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function updateOptionPsShopCountryId($value)
|
||||
{
|
||||
if (!$this->errors && $value) {
|
||||
$country = new Country($value, $this->context->language->id);
|
||||
if ($country->id) {
|
||||
Configuration::updateValue('PS_SHOP_COUNTRY_ID', $value);
|
||||
Configuration::updateValue('PS_SHOP_COUNTRY', pSQL($country->name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function updateOptionPsShopStateId($value)
|
||||
{
|
||||
if (!$this->errors && $value) {
|
||||
$state = new State($value);
|
||||
if ($state->id) {
|
||||
Configuration::updateValue('PS_SHOP_STATE_ID', $value);
|
||||
Configuration::updateValue('PS_SHOP_STATE', pSQL($state->name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function postProcess()
|
||||
@@ -427,18 +601,16 @@ class AdminHotelGeneralSettingsController extends ModuleAdminController
|
||||
$this->errors[] = $this->l('Please enter Google API key.');
|
||||
}
|
||||
}
|
||||
if (!trim(Tools::getValue('WK_HOTEL_GLOBAL_ADDRESS'))) {
|
||||
$this->errors[] = $this->l('Hotel global address field is required');
|
||||
if (!trim(Tools::getValue('PS_SHOP_NAME'))) {
|
||||
$this->errors[] = $this->l('Website name field is required');
|
||||
}
|
||||
if (!trim(Tools::getValue('WK_HOTEL_GLOBAL_CONTACT_NUMBER'))) {
|
||||
$this->errors[] = $this->l('Hotel global contact number field is required');
|
||||
} elseif (!Validate::isPhoneNumber(Tools::getValue('WK_HOTEL_GLOBAL_CONTACT_NUMBER'))) {
|
||||
$this->errors[] = $this->l('Hotel global contact number field is invalid');
|
||||
if (!trim(Tools::getValue('PS_SHOP_ADDR1'))) {
|
||||
$this->errors[] = $this->l('Address Line1 field is required');
|
||||
}
|
||||
if (!trim(Tools::getValue('WK_HOTEL_GLOBAL_CONTACT_EMAIL'))) {
|
||||
$this->errors[] = $this->l('Hotel global contact email field is required');
|
||||
} elseif (!Validate::isEmail(Tools::getValue('WK_HOTEL_GLOBAL_CONTACT_EMAIL'))) {
|
||||
$this->errors[] = $this->l('Hotel global contact email field is invalid');
|
||||
if (!trim(Tools::getValue('PS_SHOP_PHONE'))) {
|
||||
$this->errors[] = $this->l('Phone field is required');
|
||||
} elseif (!Validate::isPhoneNumber(Tools::getValue('PS_SHOP_PHONE'))) {
|
||||
$this->errors[] = $this->l('Phone field is invalid');
|
||||
}
|
||||
if (trim(Tools::getValue('WK_CUSTOMER_SUPPORT_PHONE_NUMBER')) != '') {
|
||||
if (!Validate::isPhoneNumber(trim(Tools::getValue('WK_CUSTOMER_SUPPORT_PHONE_NUMBER')))) {
|
||||
|
||||
@@ -673,9 +673,6 @@ class HotelReservationSystem extends Module
|
||||
$configKeys = array(
|
||||
'WK_HOTEL_LOCATION_ENABLE',
|
||||
'WK_ROOM_LEFT_WARNING_NUMBER',
|
||||
'WK_HOTEL_GLOBAL_ADDRESS',
|
||||
'WK_HOTEL_GLOBAL_CONTACT_EMAIL',
|
||||
'WK_HOTEL_GLOBAL_CONTACT_NUMBER',
|
||||
'WK_HTL_ESTABLISHMENT_YEAR',
|
||||
'WK_HTL_CHAIN_NAME',
|
||||
'WK_TITLE_HEADER_BLOCK',
|
||||
@@ -689,6 +686,7 @@ class HotelReservationSystem extends Module
|
||||
'WK_HOTEL_NAME_ENABLE',
|
||||
'WK_CUSTOMER_SUPPORT_PHONE_NUMBER',
|
||||
'WK_CUSTOMER_SUPPORT_EMAIL',
|
||||
'WK_DISPLAY_CONTACT_PAGE_HOTEL_LIST'
|
||||
);
|
||||
foreach ($configKeys as $key) {
|
||||
if (!Configuration::deleteByName($key)) {
|
||||
|
||||
BIN
modules/hotelreservationsystem/views/img/Slices/no-hotel.png
Normal file
BIN
modules/hotelreservationsystem/views/img/Slices/no-hotel.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.8 KiB |
@@ -834,8 +834,12 @@ function toggleGoogleMapsFields()
|
||||
{
|
||||
if ($('#WK_GOOGLE_ACTIVE_MAP_on').attr('checked') == 'checked') {
|
||||
$('#conf_id_WK_MAP_HOTEL_ACTIVE_ONLY').parent().show();
|
||||
$('#conf_id_WK_DISPLAY_CONTACT_PAGE_GOOLGE_MAP').parent().show();
|
||||
$('#conf_id_WK_DISPLAY_PROPERTIES_PAGE_GOOGLE_MAP').parent().show();
|
||||
} else {
|
||||
$('#conf_id_WK_MAP_HOTEL_ACTIVE_ONLY').parent().hide();
|
||||
$('#conf_id_WK_DISPLAY_CONTACT_PAGE_GOOLGE_MAP').parent().hide();
|
||||
$('#conf_id_WK_DISPLAY_PROPERTIES_PAGE_GOOGLE_MAP').parent().hide();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -198,6 +198,12 @@
|
||||
<textarea name="address" rows="4" cols="35" >{if isset($smarty.post.address)}{$smarty.post.address}{elseif isset($edit)}{$address_info.address1|escape:'htmlall':'UTF-8'}{/if}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group check_in_div" style="position:relative">
|
||||
<label class="col-sm-3 control-label" for="fax">{l s='Fax' mod='hotelreservationsystem'}</label>
|
||||
<div class="col-sm-6">
|
||||
<input autocomplete="off" type="text" class="form-control" id="fax" name="fax" value="{if isset($smarty.post.fax)}{$smarty.post.fax}{elseif isset($edit)}{$hotel_info.fax|escape:'htmlall':'UTF-8'}{/if}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="control-label col-sm-3 required" for="hotel_country">{l s='Rating :' mod='hotelreservationsystem'}</label>
|
||||
<div class="col-sm-6">
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../../../../../../');
|
||||
exit;
|
||||
@@ -0,0 +1,60 @@
|
||||
{**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*}
|
||||
|
||||
{extends file="helpers/options/options.tpl"}
|
||||
|
||||
{block name="footer"}
|
||||
{$smarty.block.parent}
|
||||
{if $category == 'websitedetail'}
|
||||
<script type="text/javascript">
|
||||
function ajaxStoreStates(id_state_selected) {
|
||||
$.ajax({
|
||||
url: "index.php",
|
||||
cache: false,
|
||||
data: "ajax=1&tab=AdminStates&token={getAdminToken tab='AdminStates'}&action=states&id_country="+$('#PS_SHOP_COUNTRY_ID').val() + "&id_state=" + $('#PS_SHOP_STATE_ID').val(),
|
||||
success: function(html)
|
||||
{
|
||||
if (html == 'false') {
|
||||
$("#conf_id_PS_SHOP_STATE_ID").parent().fadeOut();
|
||||
$('#PS_SHOP_STATE_ID option[value=0]').attr("selected", "selected");
|
||||
} else {
|
||||
$("#PS_SHOP_STATE_ID").html(html);
|
||||
$("#conf_id_PS_SHOP_STATE_ID").parent().fadeIn();
|
||||
$('#PS_SHOP_STATE_ID option[value=' + id_state_selected + ']').attr("selected", "selected");
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
{if isset($categoryData.fields.PS_SHOP_STATE_ID.value)}
|
||||
if ($('#PS_SHOP_COUNTRY_ID') && $('#PS_SHOP_STATE_ID')) {
|
||||
ajaxStoreStates({$categoryData.fields.PS_SHOP_STATE_ID.value});
|
||||
$('#PS_SHOP_COUNTRY_ID').change(function() {
|
||||
ajaxStoreStates();
|
||||
});
|
||||
}
|
||||
{/if}
|
||||
});
|
||||
</script>
|
||||
{/if}
|
||||
{/block}
|
||||
@@ -21,24 +21,13 @@
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_'))
|
||||
exit;
|
||||
|
||||
function upgrade_module_1_0_4($module)
|
||||
{
|
||||
$objUpgrade = new UpgradeWkFooterAboutBlock104($module);
|
||||
return $objUpgrade->initUpgrade();
|
||||
}
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
class UpgradeWkFooterAboutBlock104
|
||||
{
|
||||
public function __construct($module)
|
||||
{
|
||||
$this->module = $module;
|
||||
}
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
public function initUpgrade()
|
||||
{
|
||||
return $this->module->unregisterHook('displayFooterPaymentInfo');
|
||||
}
|
||||
}
|
||||
header('Location: ../../../');
|
||||
exit;
|
||||
@@ -1,52 +0,0 @@
|
||||
------------------------------
|
||||
# V1.0.3 to V1.0.4
|
||||
------------------------------
|
||||
|
||||
## Improved/Changed Features:
|
||||
|
||||
* [CO] : [#528] licenses updated
|
||||
* [FO] : [#387] Add nav bar and move language and currency selector at top at front office
|
||||
|
||||
|
||||
------------------------------
|
||||
# V1.0.2 to V1.0.3
|
||||
------------------------------
|
||||
|
||||
## Improved/Changed Features:
|
||||
|
||||
[*] FO : [#290] Using $this->_path for including css and js
|
||||
|
||||
|
||||
-------------------------------
|
||||
# V1.0.1 to V1.0.2
|
||||
-------------------------------
|
||||
|
||||
## Improved/changed features
|
||||
|
||||
[*] FO : Translations are corrected.
|
||||
|
||||
## Update Policy
|
||||
|
||||
- Mobule need only file update, can be updated only by UPLOADING new version on module
|
||||
|
||||
|
||||
|
||||
-----------------------------
|
||||
# V1.0.0 to V1.0.1
|
||||
-----------------------------
|
||||
|
||||
## Added features
|
||||
|
||||
+ [CO] : index.php added/Updated in all folders
|
||||
+ [CO] : License.txt added.
|
||||
+ [CO] : License added in every file.
|
||||
+ [CO] : logo.gif file added.
|
||||
|
||||
|
||||
## Improved/changed features
|
||||
|
||||
- [CO] : WK_HTL_SHORT_DESC (configuration key) is called as multilang field now.
|
||||
|
||||
## Update Policy
|
||||
|
||||
- Mobule need only file update, can be updated only by UPLOADING new version on module
|
||||
@@ -1,223 +0,0 @@
|
||||
SOFTWARE LICENCE AGREEMENT
|
||||
===============================
|
||||
|
||||
This AGREEMENT is made effective on the date of the purchase of the software between Webkul Software Pvt. Ltd.,Company incorporated under the Companies Act, 1956 (hereinafter referred to as “Licensor"), and the purchaser of the software/ product (hereinafter referred to as "Licensee").
|
||||
|
||||
Preamble
|
||||
==================
|
||||
Licensor is a web and mobile product based organization engaged in the business of developing and marketing software for enterprise level e-commerce businesses. It is an ISO and NSR (NASSCOM) certified organization having a team of more than 150 creative engineers which come from different backgrounds. It has developed more than 700 web extensions and apps in the past few years for open source platforms which are used and trusted globally. Licensee now wishes to obtain license, and Licensor wishes to grant a license, to allow use of the software so purchased in developing the e-commerce business website/ mobile app of the Licensee, subject to the terms and conditions set forth herein.
|
||||
|
||||
|
||||
THEREFORE, with the intent to be legally bound, the parties hereby agree as follows:
|
||||
|
||||
|
||||
Agreement
|
||||
================
|
||||
|
||||
1.Definitions :
|
||||
------------------
|
||||
As used in this Agreement, the following capitalized terms shall have the definitions set forth below:
|
||||
|
||||
|
||||
"Derivative Works" are works developed by Licensee, its officers, agents, contractors or employees, which are based upon, in whole or in part, the Source Code and/or the Documentation and may also be based upon and/or incorporate one or more other preexisting works of the Licensor. Derivative Works may be any improvement, revision, modification, translation (including compilation or recapitulation by computer), abridgment, condensation, expansion, or any other form in which such a preexisting work may be recast, transformed, or adapted. For purposes hereof, a Derivative Work shall also include any compilation that incorporates such a preexisting work.
|
||||
|
||||
|
||||
"Documentation" is written, printed or otherwise recorded or stored (digital or paper) material relating to the Software and/or Source Code, including technical specifications and instructions for its use including Software/ Source Code annotations and other descriptions of the principles of its operation and instructions for its use.
|
||||
|
||||
|
||||
"Improvements" shall mean, with respect to the Software, all modifications and changes made, developed, acquired or conceived after the date hereof and during the entire term of this Agreement.
|
||||
|
||||
|
||||
"Source Code" is the computer programming source code form of the Software in the form maintained by the Licensor, and includes all non-third-party executables, libraries, components, and Documentation created or used in the creation, development, maintenance, and support of the Software as well as all updates, error corrections and revisions thereto provided by Licensor, in whole or in part.
|
||||
|
||||
|
||||
2. Software License.
|
||||
-------------------------
|
||||
|
||||
(a)Grant of License. For the consideration set forth below, Licensor hereby grants to Licensee, and Licensee hereby accepts the worldwide, non-exclusive, perpetual, royalty-free rights and licenses set forth below:
|
||||
|
||||
|
||||
(i)The right and license to use and incorporate the software, in whole or in part, to develop its website/ mobile app (including the integration of all or part of the Licensor’s software into Licensee's own software) on one domain ( Except Joomla modules , listed on store are entitled to be used on unlimited domain as per the standard guidelines ) only, solely for the own personal or business use of the Licensee. However, the License does not authorize the Licensee to compile, copy or distribute the said Software or its Derivative Works.
|
||||
|
||||
|
||||
(ii)The right and license does not authorize the Licensee to make any backup or archival copies of the Software and / or the Source Code and Documentation.
|
||||
|
||||
(iii)The right and license does not authorize the Licensee to migrate the domain license to another domain.
|
||||
|
||||
|
||||
(b)Scope; Rights and Responsibilities.
|
||||
|
||||
|
||||
(i)Licensor shall enable the Licensee to download one complete copy of the Software.
|
||||
|
||||
|
||||
(ii)The Software is intended for the sole use of the Licensee in development of its own website/ mobile app.
|
||||
|
||||
|
||||
(iii)Licensee does not have the right to hand over, sell, distribute, sub-license, rent, lease or lend any portion of the Software or Documentation, whether modified or unmodified, to anyone. Licensee should not place the Software on a server so that it becomes accessible via a public network such as the Internet for distribution purposes. In case the Licensee is using any source code management system like github, it can use the code there only when it has paid subscription from such management system.
|
||||
|
||||
|
||||
(iv)Licensee is not authorized to appoint, or work with, third parties to perform any development services using the Source Code, the source code to Derivative Works and/or the Documentation on behalf of, or working with, the Licensee. Release of Source Code, Derivative Work source code and/or Documentation to any third party shall be considered as violation of the Agreement, inter-alia entailing forthwith termination and legal action.
|
||||
|
||||
|
||||
|
||||
(c)Ownership.
|
||||
|
||||
|
||||
(i)Software and Source Code. All right, title, copyright, and interest in the Software, Source Code, Software Modifications and Error corrections will be and remain the property of Licensor.
|
||||
|
||||
|
||||
(ii)Derivative Works. As creation of Derivative Works by the Licensee is prohibited, thus, all right, title, copyright, and interest in any and/or all Derivative Works and Improvements created by, or on behalf of, Licensee will also be deemed to the property of Licensor. Licensor shall be entitled to protect copyright / intellectual property in all such Derivative Works and Improvements also in any country as it may deem fit including without limitation seeking copyright and/or patent protection.
|
||||
|
||||
|
||||
3.Consideration.
|
||||
--------------------
|
||||
|
||||
(a)Licensee shall pay to Licensor the amount as mentioned on the website from where the order is placed, as one-time, upfront fees in consideration for the licenses and rights granted hereunder (hereinafter referred to as the "License Fee"). The License Fee to be paid by Licensee shall be paid upfront at the time of placing the order, and no credit will be allowed under any circumstances.
|
||||
|
||||
|
||||
(b)Once paid, the License Fees shall be non-refundable. The Licensee has fully satisfied itself about the Software and has seen the demonstration, and only thereafter has placed the order. Thus, the License Fees or any part thereof is non-refundable. No claim for refund of the Licence Fees shall be entertained under any circumstances.
|
||||
|
||||
|
||||
|
||||
4.Representations and Warranties.
|
||||
-------------------------------------
|
||||
|
||||
(a)Mutual. Each of the parties represents and warrants to the other as follows.
|
||||
|
||||
|
||||
(i)such party is a legal entity duly organized, validly existing and in good standing;
|
||||
|
||||
|
||||
(ii)such party has the power and authority to conduct its business as presently conducted and to enter into, execute, deliver and perform this Agreement.
|
||||
|
||||
|
||||
(iii)This Agreement has been duly and validly accepted by such party and constitutes the legal, valid and binding obligations of such party respectively, enforceable against such party in accordance with their respective terms;
|
||||
|
||||
|
||||
(iv)the acceptance, execution, delivery and performance of this Agreement does not and will not violate such party's charter or by-laws; nor require any consent, authorization, approval, exemption or other action by any third party or governmental entity.
|
||||
|
||||
|
||||
(b)Licensor warrants that, at the time of purchase of the Software:
|
||||
|
||||
|
||||
the Software will function materially as set forth in the website or published functionality provided by Licensor to customers and potential customers describing the Software; and
|
||||
|
||||
|
||||
Software add-ons, if purchased by the Licensee from the Licensor, will not materially diminish the features or functions of or the specifications of the Software as they existed as of the execution of this Agreement.
|
||||
|
||||
|
||||
|
||||
(c)Title. Licensor represents and warrants that it is the exclusive owner of all copyright/ intellectual property in the Software (including the Source Code) and has good and marketable title to the Software (including the Source Code) free and clear of all liens, claims and encumbrances of any nature whatsoever (collectively, "Liens"). Licensor's grant of license and rights to Licensee hereunder does not, and will not infringe any third party's property, intellectual property or personal rights.
|
||||
|
||||
|
||||
|
||||
5.Term.
|
||||
-------------
|
||||
|
||||
(a)Subject to Licensee's payment obligations, this Agreement shall commence as on the date of making payment of the Software by the Licensee to the Licensor, and shall continue until terminated by either party.
|
||||
|
||||
|
||||
(b)The Licensor retains the right to terminate the license at any time, if the Licensee is not abiding by any of the terms of the Agreement. The Licensee may terminate the Agreement at any time at its own discretion by uninstalling the Software and /or by destroying the said Software (or any copies thereof). However, the Licensee shall not be entitled to seek any refund of the amount paid by it to the Licensor, under any circumstances.
|
||||
|
||||
|
||||
(c)Survival. In the event this Agreement is terminated for any reason, the provisions set forth in Sections 2(a), 2(b), and 2(c) shall survive.
|
||||
|
||||
|
||||
|
||||
|
||||
6. Indemnification
|
||||
----------------------
|
||||
|
||||
The Licensee release the Licensor from, and agree to indemnify, defend and hold harmless the Licensor (and its officers, directors, employees, agents and Affiliates) against, any claim, loss, damage, settlement, cost, taxes, expense or other liability (including, without limitation, attorneys' fees) (each, a "Claim") arising from or related to: (a) any actual or alleged breach of any obligations in this Agreement; (b) any refund, adjustment, or return of Software,(c) any claim for actual or alleged infringement of any Intellectual Property Rights made by any third party or damages related thereto; or (d) Taxes.
|
||||
|
||||
|
||||
7. Limitation of Liability
|
||||
------------------------------
|
||||
|
||||
The Licensor will not be liable for any direct, indirect, incidental, special, consequential or exemplary damages, including but not limited to, damages for loss of profits, goodwill, use, data or other intangible losses arising out of or in connection with the Software, whether in contract, warranty, tort etc. (including negligence, software liability, any type of civil responsibility or other theory or otherwise) to the Licensee or any other person for cost of software, cover, recovery or recoupment of any investment made by the Licensee or its affiliates in connection with this Agreement, or for any other loss of profit, revenue, business, or data or punitive or consequential damages arising out of or relating to this Agreement. Further, the aggregate liability of the Licensor, arising out of or in connection with this Agreement or the transactions contemplated hereby will not exceed at any time, or under any circumstances, the total amounts received by the Licensor from the Licensee in connection with the particular software giving rise to the claim.
|
||||
|
||||
|
||||
8. Force Majeure
|
||||
---------------------
|
||||
|
||||
The Licensor will not be liable for any delay or failure to perform any of its obligations under this Agreement by reasons, events or other matters beyond its reasonable control.
|
||||
|
||||
|
||||
9. Relationship of Parties
|
||||
------------------------------
|
||||
|
||||
The Licensor and Licensee are independent legal entities, and nothing in this Agreement will be construed to create a partnership, joint venture, association of persons, agency, franchise, sales representative, or employment relationship between the parties. The Licensee will have no authority to make or accept any offers or representations on behalf of the Licensor. The relationship between the parties is that of Licensor and Licensee only, and the rights, duties, liabilities of each party shall be governed by this Agreement.
|
||||
|
||||
|
||||
10. Modification
|
||||
------------------------
|
||||
|
||||
The Licensor may amend any of the terms and conditions contained in this Agreement at any time and solely at its discretion. Any changes will be effective upon the posting of such changes on the Portal/ website, and the Licensee is responsible for reviewing these changes and informing itself of all applicable changes or notices. The continued use of a software by the Licensee after posting of any changes by the Licensor, will constitute the acceptance of such changes or modifications by the Licensee.
|
||||
|
||||
|
||||
|
||||
11.Miscellaneous.
|
||||
-----------------------
|
||||
|
||||
(a)General Provisions. This Agreement: (i) may be amended only by a writing signed by each of the parties; (ii) may be executed in several counterparts, each of which shall be deemed an original but all of which shall constitute one and the same instrument; (iii) contains the entire agreement of the parties with respect to the transactions contemplated hereby and supersedes all prior written and oral agreements, and all contemporaneous oral agreements, relating to such transactions; (iv) shall be governed by, and construed and enforced in accordance with, the laws of India; and (v) shall be binding upon, and inure to the benefit of, the parties and their respective successors and permitted assigns. Each of the parties hereby irrevocably submits to the jurisdiction of the Courts at Delhi, India, for the purposes of any action or proceeding arising out of or relating to this Agreement or the subject matter hereof and brought by any other party.
|
||||
|
||||
|
||||
(b)Assignment. Licensee cannot assign, pledge or otherwise transfer, whether by operation of law or otherwise, this Agreement, or any of its obligations hereunder, without the prior written consent of Licensor, which consent shall not be unreasonably withheld.
|
||||
|
||||
|
||||
(c)Notices. Unless otherwise specifically provided herein, all notices, consents, requests, demands and other communications required or permitted hereunder:
|
||||
|
||||
|
||||
(i)shall be in writing;
|
||||
|
||||
|
||||
(ii)shall be sent by messenger, certified or registered mail/email, or reliable express delivery service, to the appropriate address(es) set forth below; and
|
||||
|
||||
|
||||
(iii)shall be deemed to have been given on the date of receipt by the addressee, as evidenced by a receipt executed by the addressee (or a responsible person in his or her office), the records of the Party delivering such communication or a notice to the effect that such addressee refused to claim or accept such communication, if sent by messenger, mail or express delivery service.
|
||||
|
||||
|
||||
All such communications shall be sent to the following addresses or numbers, or to such other addresses or numbers as any party may inform the others by giving five days' prior notice:
|
||||
|
||||
|
||||
If to Webkul Software Pvt. Ltd.:
|
||||
|
||||
|
||||
|
||||
Webkul Software Pvt. Ltd.
|
||||
|
||||
H-28, ARV Park, Sector 63, NOIDA – 201301,
|
||||
|
||||
Uttar Pradesh, India
|
||||
|
||||
|
||||
If to Licensee:
|
||||
|
||||
At the address mentioned by the Licensee
|
||||
|
||||
(at the time of placing order of generating Invoice)
|
||||
|
||||
|
||||
(d)Severability. It is the intent of the parties that the provisions of this Agreement be enforced to the fullest extent permissible under the laws and public policies of India in which enforcement hereof is sought. In furtherance of the foregoing, each provision hereof shall be severable from each other provision, and any provision hereof which is/ becomes unenforceable shall be subject to the following: (i) if such provision is contrary to or conflicts with any requirement of any statute, rule or regulation in effect, then such requirement shall be incorporated into, or substituted for, such unenforceable provision to the minimum extent necessary to make such provision enforceable; (ii) the court, agency or arbitrator considering the matter is hereby authorized to (or, if such court, agency or arbitrator is unwilling or fails to do so, then the parties shall) amend such provision to the minimum extent necessary to make such provision enforceable, and the parties hereby consent to the entry of an order so amending such provision; and (iii) if any such provision cannot be or is not reformed and made enforceable pursuant to clause (i) or (ii) above, then such provision shall be ineffective to the minimum extent necessary to make the remainder of this Agreement enforceable. Any application of the foregoing provisions to any provision hereof shall not effect the validity or enforceability of any other provision hereof.
|
||||
|
||||
|
||||
(e)By purchasing the Software, the Licensee acknowledge that it has read this Agreement, and that it agrees to the content of the Agreement, its terms and agree to use the Software in compliance with this Agreement.
|
||||
|
||||
|
||||
(f)The Licensor holds the sole copyright of the Software. The Software or any portion thereof is a copyrightable matter and is liable to be protected by the applicable laws. Copyright infringement in any manner can lead to prosecution according to the current law. The Licensor reserves the right to revoke the license of any user who is not holding any license or is holding an invalid license.
|
||||
|
||||
|
||||
(g)This Agreement gives the right to use only one copy of the Software on one domain solely for the own personal or business use of the Licensee, subject to all the terms and conditions of this Agreement. A separate License has to be purchased for each new Software installation. Any distribution of the Software without the written consent of the Licensor (including non-commercial distribution) is regarded as violation of this Agreement, and will entail immediate termination of the Agreement and may invite liability, both civil and criminal, as per applicable laws.
|
||||
|
||||
|
||||
(h)The Licensor reserves the rights to publish a selected list of users/ Licensees of its Software, and no permission of any Licensee is needed in this regard. The Licensee agrees that the Licensor may, in its sole discretion, disclose or make available any information provided or submitted by the Licensee or related to it under this Agreement to any judicial, quasi-judicial, governmental, regulatory or any other authority as may be required by the Licensor to co-operate and / or comply with any of their orders, instructions or directions or to fulfill any requirements under applicable Laws.
|
||||
|
||||
|
||||
(i)If the Licensee continues to use the Software even after the sending of the notice by the Licensor for termination, the Licensee agree to accept an injunction to restrain itself from its further use, and to pay all costs (including but not limited to reasonable attorney fees) to enforce injunction or to revoke the License, and any damages suffered by the Licensor because of the misuse of the Software by the Licensee.
|
||||
|
||||
|
||||
12. Arbitration
|
||||
-----------------------
|
||||
|
||||
If any dispute arises between the Licensor and the Licensee at any time, in connection with the validity, interpretation, implementation or alleged breach of any provision of this Agreement, the same shall be referred to a sole Arbitrator who shall be an independent and neutral third party appointed exclusively by the Licensor. The Licensee shall not object to the appointment of the Arbitrator so appointed by the Licensor. The place of arbitration shall be Delhi, India. The Arbitration & Conciliation Act, 1996 as amended by The Arbitration & Conciliation (Amendment) Act, 2015, shall govern the arbitration proceedings. The arbitration proceedings shall be held in the English language.
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2010-2018 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright 2010-2018 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../');
|
||||
exit;
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.1 KiB |
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2010-2018 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright 2010-2018 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../');
|
||||
exit;
|
||||
@@ -1,25 +0,0 @@
|
||||
/**
|
||||
* 2010-2018 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright 2010-2018 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*/
|
||||
|
||||
.footer-about-hotel {
|
||||
color: #BFBFBF;
|
||||
font-size: 16px;
|
||||
font-weight: 400;
|
||||
line-height: 25px;
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2010-2018 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright 2010-2018 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../');
|
||||
exit;
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2010-2018 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright 2010-2018 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../');
|
||||
exit;
|
||||
@@ -1,30 +0,0 @@
|
||||
{*
|
||||
* 2010-2018 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright 2010-2018 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*}
|
||||
|
||||
<div class="row">
|
||||
<section class="col-xs-12 col-sm-12">
|
||||
<div class="row margin-lr-0 footer-section-heading">
|
||||
<p>{l s='About' mod='wkfooteraboutblock'}</p>
|
||||
<hr/>
|
||||
</div>
|
||||
<div class="row margin-lr-0 footer-about-hotel">
|
||||
<p>{$WK_HTL_SHORT_DESC|truncate:220:'':true|escape:'html':'UTF-8'}</p>
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2010-2018 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright 2010-2018 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*/
|
||||
|
||||
header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
|
||||
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
|
||||
|
||||
header('Cache-Control: no-store, no-cache, must-revalidate');
|
||||
header('Cache-Control: post-check=0, pre-check=0', false);
|
||||
header('Pragma: no-cache');
|
||||
|
||||
header('Location: ../../../');
|
||||
exit;
|
||||
@@ -1,62 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* 2010-2018 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through this link for complete license : https://store.webkul.com/license.html
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to newer
|
||||
* versions in the future. If you wish to customize this module for your
|
||||
* needs please refer to https://store.webkul.com/customisation-guidelines/ for more information.
|
||||
*
|
||||
* @author Webkul IN <support@webkul.com>
|
||||
* @copyright 2010-2018 Webkul IN
|
||||
* @license https://store.webkul.com/license.html
|
||||
*/
|
||||
|
||||
if (!defined('_PS_VERSION_')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
class WkFooterAboutBlock extends Module
|
||||
{
|
||||
public function __construct()
|
||||
{
|
||||
$this->name = 'wkfooteraboutblock';
|
||||
$this->tab = 'front_office_features';
|
||||
$this->version = '1.0.4';
|
||||
$this->author = 'Webkul';
|
||||
$this->need_instance = 0;
|
||||
|
||||
$this->bootstrap = true;
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Footer About Hotel Block');
|
||||
$this->description = $this->l('Show About Hotel block in footer.');
|
||||
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => _PS_VERSION_);
|
||||
}
|
||||
|
||||
public function hookDisplayFooterMostLeftBlock($params)
|
||||
{
|
||||
$this->context->smarty->assign(
|
||||
array('WK_HTL_SHORT_DESC' => Configuration::get('WK_HTL_SHORT_DESC', $this->context->language->id))
|
||||
);
|
||||
|
||||
$this->context->controller->addCSS($this->_path.'/views/css/wkFooterAboutBlockFront.css');
|
||||
return $this->display(__FILE__, 'wkFooterAboutBlock.tpl');
|
||||
}
|
||||
|
||||
public function install()
|
||||
{
|
||||
if (!parent::install()
|
||||
|| !$this->registerHook('displayFooterMostLeftBlock')
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@
|
||||
{block name='displayRoomTypeListBefore'}
|
||||
{hook h='displayRoomTypeListBefore'}
|
||||
{/block}
|
||||
{if isset($booking_data['stats']) && $booking_data['stats']['num_avail'] || isset($display_all_room_types) && $display_all_room_types}
|
||||
{if isset($booking_data['stats']) && $booking_data['stats']['num_avail'] || isset($display_all_room_types) && $display_all_room_types && isset($booking_data['rm_data'])}
|
||||
{foreach from=$booking_data['rm_data'] key=room_k item=room_v}
|
||||
{if $room_v['data']['available']|count || isset($display_all_room_types) && $display_all_room_types }
|
||||
<div class="col-sm-12 room_cont" data-id-product="{$room_v['id_product']|escape:'htmlall':'UTF-8'}">
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
{hook h='displayBeforeHotelBranchInformation'}
|
||||
{/block}
|
||||
{block name='contact_form_hotel_branches'}
|
||||
{if isset($hotelsInfo) && $hotelsInfo}
|
||||
{if isset($displayHotels) && $displayHotels && isset($hotelsInfo) && $hotelsInfo}
|
||||
<div class="row hotels-container">
|
||||
<div class="col-sm-12 hotel-header">
|
||||
<span>{l s='Our Hotels'}</span>
|
||||
@@ -200,8 +200,8 @@
|
||||
{hook h='displayAfterHotelBranchInformation'}
|
||||
{/block}
|
||||
{block name='contact_form_hotel_locations'}
|
||||
{if isset($hotelLocationArray)}
|
||||
<div class="row">
|
||||
{if isset($displayHotelMap) && $displayHotelMap && isset($hotelLocationArray)}
|
||||
<div class="row {if !(isset($displayHotels) && $displayHotels && isset($hotelsInfo) && $hotelsInfo)} margin-top-20{/if}">
|
||||
<div class="col-xs-12 col-sm-12" id="googleMapWrapper">
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
|
||||
@@ -9144,4 +9144,9 @@ a.link {
|
||||
font-weight: 700;
|
||||
color: #0000ff;
|
||||
text-decoration: none;
|
||||
}
|
||||
}
|
||||
|
||||
div a.our_properties_link{
|
||||
color: #fff;
|
||||
font-size: 17px;
|
||||
font-weight: 400;}
|
||||
|
||||
149
themes/hotel-reservation-theme/css/our-properties.css
Normal file
149
themes/hotel-reservation-theme/css/our-properties.css
Normal file
@@ -0,0 +1,149 @@
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
.htl-img {
|
||||
max-width: 200px;}
|
||||
.properties-page {
|
||||
padding: 10px;}
|
||||
.page-heading {
|
||||
font-size: 32px;}
|
||||
.empty-properties-container{
|
||||
margin: 30px;}
|
||||
.our-properties-header {
|
||||
font-size: 42px;
|
||||
color: rgba(0, 0, 0, 1);
|
||||
text-align: center;
|
||||
font-weight: 300;}
|
||||
.our-properties-desc {
|
||||
font-size: 16px;
|
||||
color: rgba(0, 0, 0, 1);
|
||||
text-align: center;
|
||||
font-weight: 300;
|
||||
line-height: 30px;}
|
||||
.properties-page .hotels-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: flex-start;}
|
||||
.hotels-container .hotel-header {
|
||||
margin-bottom: 40px;
|
||||
text-align: center;}
|
||||
.hotels-container .hotel-header>span {
|
||||
font-size: 30px;
|
||||
font-weight: 400;
|
||||
color: rgba(0, 0, 0, 1);
|
||||
border-bottom: 1px solid rgba(0, 0, 0, 1);}
|
||||
.properties-page .hotel-address-container {
|
||||
border-radius: 4px;
|
||||
box-shadow: 2px 2px 15px 3px rgba(0,0,0,.1);
|
||||
float: left;
|
||||
padding: 15px 0px;
|
||||
width: 100%;}
|
||||
.hotel-address-container .hotel-name {
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: rgba(0, 0, 0, 1);
|
||||
margin-bottom: 15px;}
|
||||
.hotel-address-container span.htl-address-icon {
|
||||
background-image: url(../../../modules/hotelreservationsystem/views/img/Slices/icon-contact.png);}
|
||||
.hotel-address-container img.htl-img {
|
||||
border-radius: 6px;}
|
||||
.empty-properties-image-container {
|
||||
background-image: url(../../../modules/hotelreservationsystem/views/img/Slices/no-hotel.png) ;
|
||||
background-repeat:no-repeat;
|
||||
background-position: center center;
|
||||
padding: 200px 0px 10px 0px;
|
||||
display: block;}
|
||||
.hotel-address-container span.htl-phone-icon {
|
||||
background-image: url(../../../modules/hotelreservationsystem/views/img/Slices/icon-contact.png);
|
||||
padding: 1px 15px 0px 2px;
|
||||
background-position: 37px;
|
||||
margin-right: 5px;
|
||||
font-size: 14px;}
|
||||
.hotel-address-container span.htl-email-icon {
|
||||
padding: 1px 10px 1px;
|
||||
background-position: 19px;
|
||||
margin-right: 5px;}
|
||||
span.htl-map-icon {
|
||||
background-image: url(../../../modules/hotelreservationsystem/views/img/Slices/icon-contact.png);
|
||||
padding: 1px 20px 0px 0px;
|
||||
background-position: 0px 0px;
|
||||
margin-right: 5px;
|
||||
font-size: 14px;}
|
||||
.view_rooms_btn, .htl-map-direction-btn {
|
||||
border-radius: 4px;
|
||||
padding: 10px 12px;
|
||||
text-transform: uppercase;}
|
||||
.htl-map-direction-btn{
|
||||
background-color: #DEDEDE;
|
||||
color: #333333; }
|
||||
.view_rooms_btn {
|
||||
background-color: #1292FF;
|
||||
border-color: #1292FF;
|
||||
font-weight: 600;}
|
||||
.view_rooms_btn:hover {
|
||||
background-color: #3c89cb;
|
||||
border-color: #3a75a7;}
|
||||
.pagination-container {
|
||||
text-align: center;}
|
||||
.hotel-branch-info-actions{
|
||||
display: flex;
|
||||
gap: 10px;}
|
||||
.pagination-container .pagination > li > a, .pagination-container .pagination > li > span {
|
||||
border: unset;}
|
||||
.pagination-container .pagination > li .active {
|
||||
border: 1px solid #333333;
|
||||
border-radius: 12px;
|
||||
z-index: 10;}
|
||||
.hotel-address-container p.hotel-branch-info-value {
|
||||
font-size: 14px;
|
||||
color: rgba(0, 0, 0, 1);
|
||||
font-weight: 400;
|
||||
line-height: 25px;}
|
||||
.hotel-address-container .htl-map-direction-btn span {
|
||||
font-size: 12px;
|
||||
color: rgba(0, 0, 0, 1);
|
||||
font-weight: 400;}
|
||||
|
||||
@media screen and (max-width: 726px) {
|
||||
.hotel-branch-info-actions{
|
||||
flex-direction: column;}
|
||||
}
|
||||
|
||||
/* ==== google map ==== */
|
||||
#googleMapWrapper {
|
||||
clear: both;
|
||||
height: 500px;}
|
||||
#map {
|
||||
width: 100%;
|
||||
height: 100%;}
|
||||
#map .view-link {
|
||||
padding-top: 4px;}
|
||||
.gm-btn-get-directions {
|
||||
text-decoration: none;
|
||||
color: #427fed;
|
||||
font-weight: bold;}
|
||||
.gm-btn-get-directions:hover {
|
||||
text-decoration: underline;
|
||||
color: #427fed;}
|
||||
.gm-btn-get-directions:focus {
|
||||
outline: none;
|
||||
color: #427fed;}
|
||||
@@ -121,6 +121,11 @@
|
||||
{block name='displayTop'}
|
||||
{if isset($HOOK_TOP)}{$HOOK_TOP}{/if}
|
||||
{/block}
|
||||
{if isset($WK_DISPLAY_PROPERTIES_LINK_IN_HEADER) && $WK_DISPLAY_PROPERTIES_LINK_IN_HEADER}
|
||||
<div>
|
||||
<a href="{$link->getPageLink('our-properties')}" class="our_properties_link">{l s='Our Properties'}</a>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
90
themes/hotel-reservation-theme/js/our-properties.js
Normal file
90
themes/hotel-reservation-theme/js/our-properties.js
Normal file
@@ -0,0 +1,90 @@
|
||||
/**
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
$(document).ready(function() {
|
||||
//By Webkul JS for Map locations of the hotels on google Map
|
||||
if (typeof hotelLocationArray != 'undefined'
|
||||
&& $('#map').length
|
||||
&& typeof google == 'object'
|
||||
&& typeof google.maps == 'object'
|
||||
) {
|
||||
initMap();
|
||||
}
|
||||
|
||||
$(document).on('click', 'ul.pagination li a', function(e){
|
||||
e.preventDefault();
|
||||
$('#pagination').val($(this).data('pagination'));
|
||||
$('form#our-properties-list').submit();
|
||||
});
|
||||
});
|
||||
|
||||
function initMap() {
|
||||
var map;
|
||||
var bounds = new google.maps.LatLngBounds();
|
||||
hotelLocationArray = JSON.parse(hotelLocationArray);
|
||||
|
||||
// Display a map on the page
|
||||
map = new google.maps.Map(document.getElementById("map"));
|
||||
google.maps.event.trigger(map, 'resize');
|
||||
|
||||
map.setTilt(45);
|
||||
|
||||
// Display multiple markers on a map
|
||||
var infoWindow = new google.maps.InfoWindow();
|
||||
var marker;
|
||||
var i;
|
||||
|
||||
$.each(hotelLocationArray, function(i, location) {
|
||||
var position = new google.maps.LatLng(location.latitude, location.longitude);
|
||||
bounds.extend(position);
|
||||
marker = new google.maps.Marker({
|
||||
position: position,
|
||||
map: map,
|
||||
title: location.hotel_name,
|
||||
animation: google.maps.Animation.DROP,
|
||||
icon: PS_STORES_ICON
|
||||
});
|
||||
|
||||
// Allow each marker to have an info window
|
||||
google.maps.event.addListener(marker, 'click', (function(marker, i) {
|
||||
return function() {
|
||||
var directionsLink = 'https://www.google.com/maps/dir/?api=1&destination='+
|
||||
location.latitude+','+location.longitude;
|
||||
var content = '<div><strong>'+location.hotel_name+'</strong></div>'+
|
||||
location.map_formated_address+
|
||||
'<div class="view-link"><a class="gm-btn-get-directions" href="'+
|
||||
directionsLink+'" target="_blank" tabindex="-1"><span>'+contact_map_get_dirs+'</span></a></div>';
|
||||
infoWindow.setContent(content);
|
||||
infoWindow.open(map, marker);
|
||||
}
|
||||
})(marker, i));
|
||||
|
||||
// Automatically center the map fitting all markers on the screen
|
||||
map.fitBounds(bounds);
|
||||
});
|
||||
|
||||
// Override our map zoom level once our fitBounds function runs (Make sure it only runs once)
|
||||
var boundsListener = google.maps.event.addListener((map), 'bounds_changed', function(event) {
|
||||
// this.setZoom(8);
|
||||
google.maps.event.removeListener(boundsListener);
|
||||
});
|
||||
}
|
||||
@@ -31,19 +31,19 @@
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="user_info_acc">
|
||||
<li><a href="{$link->getPageLink('my-account', true)|escape:'html'}" title="{l s='View my customer account' mod='blockuserinfo'}">{l s='Accounts' mod='blockuserinfo'}</a></li>
|
||||
<li><a href="{$link->getPageLink('history', true)|escape:'html'}" title="{l s='View my orders' mod='blockuserinfo'}">{l s='Orders' mod='blockuserinfo'}</a></li>
|
||||
<li><a href="{$link->getPageLink('history', true)|escape:'html'}" title="{l s='Bookings' mod='blockuserinfo'}">{l s='Bookings' mod='blockuserinfo'}</a></li>
|
||||
<li><a href="{$link->getPageLink('index', true, NULL, "mylogout")|escape:'html'}" title="{l s='Log me out' mod='blockuserinfo'}">{l s='Logout' mod='blockuserinfo'}</a></li>
|
||||
{block name='displayUserNavigationList'}
|
||||
{hook h='displayUserNavigationList'}
|
||||
{/block}
|
||||
</ul>
|
||||
</li>
|
||||
{else}
|
||||
<a class="header-top-link" href="{$link->getPageLink('my-account', true)|escape:'html'}" rel="nofollow" title="{l s='Log in to your customer account' mod='blockuserinfo'}">
|
||||
<span class="hide_xs">{l s='Sign in' mod='blockuserinfo'}</span>
|
||||
<span class="visi_xs"><i class="icon-user"></i></span>
|
||||
</a>
|
||||
</ul>
|
||||
{else}
|
||||
<a class="header-top-link" href="{$link->getPageLink('my-account', true)|escape:'html'}" rel="nofollow" title="{l s='Log in to your customer account' mod='blockuserinfo'}">
|
||||
<span class="hide_xs">{l s='Sign in' mod='blockuserinfo'}</span>
|
||||
<span class="visi_xs"><i class="icon-user"></i></span>
|
||||
</a>
|
||||
{/if}
|
||||
{if !isset($ajaxCustomerLogin)}
|
||||
</div>
|
||||
|
||||
128
themes/hotel-reservation-theme/our-properties.tpl
Normal file
128
themes/hotel-reservation-theme/our-properties.tpl
Normal file
@@ -0,0 +1,128 @@
|
||||
{*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* This source file is subject to the Open Software License version 3.0
|
||||
* that is bundled with this package in the file LICENSE.md
|
||||
* It is also available through the world-wide-web at this URL:
|
||||
* https://opensource.org/license/osl-3-0-php
|
||||
* If you did not receive a copy of the license and are unable to
|
||||
* obtain it through the world-wide-web, please send an email
|
||||
* to support@qloapps.com so we can send you a copy immediately.
|
||||
*
|
||||
* DISCLAIMER
|
||||
*
|
||||
* Do not edit or add to this file if you wish to upgrade this module to a newer
|
||||
* versions in the future. If you wish to customize this module for your needs
|
||||
* please refer to https://store.webkul.com/customisation-guidelines for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright Since 2010 Webkul
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*}
|
||||
|
||||
{block name='our_properties'}
|
||||
{capture name=path}{l s='Our 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>
|
||||
<div class="text-center our-properties-desc">
|
||||
<p>{$WK_HTL_SHORT_DESC|escape:'html':'UTF-8'}</p>
|
||||
</div>
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name='displayPropertiesLocationBefore'}
|
||||
{hook h='displayPropertiesLocationBefore'}
|
||||
{/block}
|
||||
|
||||
{block name='our_properties_location'}
|
||||
{if isset($hotelLocationArray) && $hotelLocationArray && isset($displayHotelMap) && $displayHotelMap}
|
||||
<div class="margin-top-20 margin-btm-20">
|
||||
<div class="col-xs-12 col-sm-12" id="googleMapWrapper">
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div style="clear:both;"></div>
|
||||
{/block}
|
||||
|
||||
{block name='displayPropertiesLocationAfter'}
|
||||
{hook h='displayPropertiesLocationAfter'}
|
||||
{/block}
|
||||
|
||||
{block name='displayPropertiesListBefore'}
|
||||
{hook h='displayPropertiesListBefore'}
|
||||
{/block}
|
||||
|
||||
<div class="properties-page">
|
||||
{block name='our_properties_list'}
|
||||
<div class="row hotels-container">
|
||||
{foreach $hotelsInfo as $hotel}
|
||||
<div class="{if $hotelsInfo|count != 1}col-md-6 col-xs-12{else}col-md-6 col-md-offset-3{/if} margin-btm-30">
|
||||
<div class="hotel-address-container">
|
||||
<div class="col-xs-5">
|
||||
<img class="htl-img" style="width:100%" src="{$hotel['image_url']}">
|
||||
</div>
|
||||
<div class="col-xs-7">
|
||||
<p class="hotel-name"><span>{$hotel['hotel_name']}</span></p>
|
||||
<p class="hotel-branch-info-value"><span class="htl-map-icon"></span>{$hotel['address']}, {$hotel['city']}, {if {$hotel['state_name']}}{$hotel['state_name']},{/if} {$hotel['country_name']}, {$hotel['postcode']}</p>
|
||||
<p class="hotel-branch-info-value">
|
||||
<span class="htl-address-icon htl-phone-icon"></span>{$hotel['phone']}
|
||||
</p>
|
||||
<p class="hotel-branch-info-value">
|
||||
<span class="htl-address-icon htl-email-icon"></span>{$hotel['email']}
|
||||
</p>
|
||||
<div class="hotel-branch-info-actions">
|
||||
<a href="{$hotel['view_rooms_link']}" target="_blank" class="btn btn-primary view_rooms_btn col-sm-6 col-xs-12">{l s='View Rooms'}</a>
|
||||
{if ($hotel['latitude'] != 0 || $hotel['longitude'] != 0) && $viewOnMap}
|
||||
<a class="btn htl-map-direction-btn col-sm-6 col-xs-12" href="http://maps.google.com/maps?daddr=({$hotel['latitude']},{$hotel['longitude']})" target="_blank">{l s='View on map'}</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
{block name='displayPropertiesListAfter'}
|
||||
{hook h='displayPropertiesListAfter'}
|
||||
{/block}
|
||||
|
||||
{if (isset($pageLimit)) && $pageLimit > 1}
|
||||
<form id="our-properties-list" method="post" action="{$currentPageUrl}">
|
||||
<input type="hidden" value="" name="pagination" id="pagination"/>
|
||||
</form>
|
||||
<div class="row pagination-container">
|
||||
<ul class="pagination">
|
||||
{if !isset($pagination[1])}
|
||||
<li><a href="{$currentIndex}" data-pagination="1">1</a></li>
|
||||
{if !isset($pagination[2])}
|
||||
<li><span disabled>...</span></li>
|
||||
{/if}
|
||||
{/if}
|
||||
{foreach $pagination as $page}
|
||||
<li><a href="{$currentIndex}" data-pagination="{$page}" {if $page == $currentPage}class="active"{/if}>{$page}</a></li>
|
||||
{/foreach}
|
||||
{if !isset($pagination[$pageLimit])}
|
||||
{if !isset($pagination[$pageLimit-1])}
|
||||
<li><span disabled>...</span></li>
|
||||
{/if}
|
||||
<li><a href="{$currentIndex}" data-pagination="{$pageLimit}">{$pageLimit}</a></li>
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{else}
|
||||
<div class="text-center empty-properties-container">
|
||||
<div class="row">
|
||||
<div class="empty-properties-image-container"></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<h2>{l s='No Hotel Found!!'}</h2>
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
{/block}
|
||||
Reference in New Issue
Block a user