' + place.name + '' + place.formatted_address;
+ var content = '
' + place.name + '
' + place.formatted_address + '
';
that.setFormVars({
lat: latLng.lat,
lng: latLng.lng,
@@ -142,7 +210,7 @@ var GoogleMapsManager = {
}
});
},
- addMarker: function(latLng, address = null, fa = null, cb = null) {
+ addMarker: function(latLng, address = null, fa = null, addInfoWindow = true, cb = null) {
var that = this;
that.clearAllMarkers();
var marker = new google.maps.Marker({
@@ -163,23 +231,36 @@ var GoogleMapsManager = {
});
});
- if (address === null && fa) {
- // open info window
- that.addInfoWindow(marker, fa);
+ if (addInfoWindow) {
+ if (address === null && fa) {
+ // open info window
+ that.addInfoWindow(marker, fa);
+ } else {
+ var request = {
+ placeId: address.place_id,
+ fields: ['name'],
+ };
+
+ that.placesService.getDetails(request, function(place, status) {
+ if (status === google.maps.places.PlacesServiceStatus.OK) {
+ // open info window
+ var content = '
' + place.name + '
' + address.formatted_address + '
';
+ that.addInfoWindow(marker, content);
+
+ if(cb && typeof cb === 'function') {
+ cb();
+ }
+ }
+ });
+ }
} else {
- var request = {
- placeId: address.place_id,
- fields: ['name'],
- };
- that.placesService.getDetails(request, function(place, status) {
- if (status === google.maps.places.PlacesServiceStatus.OK) {
- // open info window
- var content = '
' + place.name + '
' +
- address.formatted_address + '
';
- that.addInfoWindow(marker, content);
- }
- });
+ if(cb && typeof cb === 'function') {
+ cb();
+ }
+
+ return marker;
}
+
},
clearAllMarkers: function() {
for (var i = 0; i < this.markers.length; i++) {
@@ -190,13 +271,21 @@ var GoogleMapsManager = {
addInfoWindow: function(marker, content) {
if (typeof google === 'object') {
var that = this;
+
var infoWindow = new google.maps.InfoWindow({
content: content,
+ maxWidth: 200,
});
+
infoWindow.open({
anchor: marker,
map: that.map
});
+
+ google.maps.event.addListener(infoWindow, 'closeclick', function () {
+ that.clearAllMarkers();
+ });
+
var latLng = marker.getPosition();
that.setFormVars({
lat: latLng.lat(),
@@ -214,6 +303,10 @@ var GoogleMapsManager = {
},
}
+$(document).on('click', 'button.gm-ui-hover-effect', function () {
+ GoogleMapsManager.clearAllMarkers();
+});
+
function initGoogleMaps() {
if (typeof enabledDisplayMap != 'undefined'
&& typeof google === 'object'
diff --git a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js
index d02a0b756..ac723fcac 100644
--- a/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js
+++ b/modules/hotelreservationsystem/views/js/admin/hotel_rooms_booking.js
@@ -28,6 +28,8 @@ $(document).ready(function() {
url: rooms_booking_url,
method: 'POST',
extraParams: function() {
+ removeInitializedTooltips();
+
return $.extend(
{
ajax: true,
@@ -183,6 +185,14 @@ $(document).ready(function() {
calendar.render();
}
+ function removeInitializedTooltips() {
+ $('#fullcalendar a.day-info, #fullcalendar .fc-daygrid-event').each(function () {
+ if ($(this).data('ui-tooltip')) {
+ $(this).tooltip('destroy');
+ }
+ });
+ }
+
function getSearchData()
{
return {
@@ -869,6 +879,12 @@ $(document).ready(function() {
$("#cartModal").html(result.cart_content);
}
$("#cart_record").html(result.total_products_in_cart);
+
+ if (parseInt(result.total_products_in_cart) > 0) {
+ $('#cart_record').closest('button').removeClass('disabled');
+ } else {
+ $('#cart_record').closest('button').addClass('disabled');
+ }
}
}
});
diff --git a/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl b/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl
index 212a25a0e..ee98605c1 100644
--- a/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl
+++ b/modules/hotelreservationsystem/views/templates/admin/add_hotel/helpers/form/form.tpl
@@ -292,7 +292,7 @@
{l s='Upload images' mod='hotelreservationsystem'} :
-
+
{if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}{l s='Booking Calender' mod='hotelreservationsystem'}{else}{l s='Service Products' mod='hotelreservationsystem'}{/if }
-
+
{if !isset($booking_product) || (isset($booking_product) && $booking_product == 1)}
diff --git a/modules/wkhotelfilterblock/wkhotelfilterblock.php b/modules/wkhotelfilterblock/wkhotelfilterblock.php
index e2fa40f38..41ad65e6b 100644
--- a/modules/wkhotelfilterblock/wkhotelfilterblock.php
+++ b/modules/wkhotelfilterblock/wkhotelfilterblock.php
@@ -64,7 +64,9 @@ class wkhotelfilterblock extends Module
if ($this->context->controller->php_self == 'category') {
$htl_id_category = Tools::getValue('id_category');
- if (Validate::isLoadedObject($objCategory = new Category((int) $htl_id_category))) {
+ if (Validate::isLoadedObject($objCategory = new Category((int) $htl_id_category))
+ && ($id_hotel = HotelBranchInformation::getHotelIdByIdCategory($htl_id_category))
+ ) {
if ($objCategory->hasParent(Configuration::get('PS_LOCATIONS_CATEGORY'))) {
Media::addJsDef(array('noRoomAvailTxt' => $this->l('No room available', false, true)));
@@ -73,8 +75,6 @@ class wkhotelfilterblock extends Module
$id_lang = $this->context->language->id;
$all_feat = FeatureCore::getFeatures($id_lang);
- $id_hotel = HotelBranchInformation::getHotelIdByIdCategory($htl_id_category);
-
$max_adult = HotelRoomType::getMaxAdults($id_hotel);
$max_child = HotelRoomType::getMaxChild($id_hotel);
diff --git a/modules/wkhotelroom/views/js/WkHotelRoomBlockAdmin.js b/modules/wkhotelroom/views/js/WkHotelRoomBlockAdmin.js
index 3bec54859..7aee0d3a2 100644
--- a/modules/wkhotelroom/views/js/WkHotelRoomBlockAdmin.js
+++ b/modules/wkhotelroom/views/js/WkHotelRoomBlockAdmin.js
@@ -38,6 +38,7 @@ $(document).ready(function() {
data: {
q: word,
_: n,
+ booking_product: '1',
},
success: function(result) {
if (result) {
diff --git a/modules/wkroomsearchblock/wkroomsearchblock.php b/modules/wkroomsearchblock/wkroomsearchblock.php
index f40e7f0f1..dc696e4af 100644
--- a/modules/wkroomsearchblock/wkroomsearchblock.php
+++ b/modules/wkroomsearchblock/wkroomsearchblock.php
@@ -124,7 +124,9 @@ class WkRoomSearchBlock extends Module
{
if ('category' == Tools::getValue('controller')) {
$idCategory = Tools::getValue('id_category');
- if (Validate::isLoadedObject($objCategory = new Category((int) $idCategory))) {
+ if (Validate::isLoadedObject($objCategory = new Category((int) $idCategory))
+ && HotelBranchInformation::getHotelIdByIdCategory($idCategory)
+ ) {
if ($objCategory->hasParent(Configuration::get('PS_LOCATIONS_CATEGORY'))) {
$objSearchHelper = new WkRoomSearchHelper();
$objSearchHelper->assignSearchPanelVariables();
diff --git a/themes/hotel-reservation-theme/address.tpl b/themes/hotel-reservation-theme/address.tpl
index 3e3e9da78..e581f5382 100644
--- a/themes/hotel-reservation-theme/address.tpl
+++ b/themes/hotel-reservation-theme/address.tpl
@@ -22,14 +22,24 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
-{capture name=path}{l s='Your address'}{/capture}
+{capture name=path}
+
+ {l s='My account'}
+
+
+ {$navigationPipe}
+
+
+ {l s='Address'}
+
+{/capture}
{if isset($smarty.get.updated) && $smarty.get.updated}
{l s='Your address has been successfully updated.'}
{/if}
-
{l s='Your address'}
+
{l s='Address'}
{if isset($id_address) && (isset($smarty.post.alias) || isset($address->alias))}
{l s='Modify address'}
@@ -215,7 +225,7 @@
diff --git a/themes/hotel-reservation-theme/css/order-opc.css b/themes/hotel-reservation-theme/css/order-opc.css
index 560d3ae92..dd4c0756d 100644
--- a/themes/hotel-reservation-theme/css/order-opc.css
+++ b/themes/hotel-reservation-theme/css/order-opc.css
@@ -409,11 +409,6 @@
font-size: 14px;
color: #0000FF;
}
-#order-opc .avail_vouchers_block .avail_voucher_des {
- font-size: 12px;
- color: #777777;
- margin-bottom: 2px;
-}
#order-opc .avail_vouchers_block .seperator {
margin-top: 10px;
margin-bottom: 10px;
diff --git a/themes/hotel-reservation-theme/discount.tpl b/themes/hotel-reservation-theme/discount.tpl
index 25440cad7..ea4ba715f 100644
--- a/themes/hotel-reservation-theme/discount.tpl
+++ b/themes/hotel-reservation-theme/discount.tpl
@@ -22,10 +22,10 @@
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*}
-{capture name=path}
{l s='My account'}{$navigationPipe}{l s='My vouchers'}{/capture}
+{capture name=path}
{l s='My account'}{$navigationPipe}{l s='Vouchers'}{/capture}
- {l s='My vouchers'}
+ {l s='Vouchers'}
{if isset($cart_rules) && $nb_cart_rules}
@@ -33,7 +33,7 @@
| {l s='Code'} |
- {l s='Description'} |
+ {l s='Name'} |
{l s='Quantity'} |
{l s='Value'} |
{l s='Minimum'} |
@@ -98,7 +98,7 @@
- {l s='Back to your account'}
+ {l s='Back to My account'}
diff --git a/themes/hotel-reservation-theme/history.tpl b/themes/hotel-reservation-theme/history.tpl
index 8135b8fbc..b6eeee269 100644
--- a/themes/hotel-reservation-theme/history.tpl
+++ b/themes/hotel-reservation-theme/history.tpl
@@ -27,10 +27,10 @@
{l s='My account'}
{$navigationPipe}
- {l s='Order history'}
+ {l s='Bookings'}
{/capture}
{include file="$tpl_dir./errors.tpl"}
-{l s='Order history'}
+{l s='Bookings'}
{l s='Here are the orders you\'ve placed since your account was created.'}
{if $slowValidation}
{l s='If you have just placed an order, it may take a few minutes for it to be validated. Please refresh this page if your order is missing.'}
@@ -127,7 +127,7 @@
- {l s='Back to Your Account'}
+ {l s='Back to My account'}
diff --git a/themes/hotel-reservation-theme/identity.tpl b/themes/hotel-reservation-theme/identity.tpl
index b84a30800..bba309d88 100644
--- a/themes/hotel-reservation-theme/identity.tpl
+++ b/themes/hotel-reservation-theme/identity.tpl
@@ -31,12 +31,12 @@
{$navigationPipe}
- {l s='Your personal information'}
+ {l s='Personal information'}
{/capture}
- {l s='Your personal information'}
+ {l s='Personal information'}
{include file="$tpl_dir./errors.tpl"}
@@ -206,7 +206,7 @@
- {l s='Back to your account'}
+ {l s='Back to My account'}
diff --git a/themes/hotel-reservation-theme/js/order-opc.js b/themes/hotel-reservation-theme/js/order-opc.js
index 0649a68dd..2a1f0756e 100644
--- a/themes/hotel-reservation-theme/js/order-opc.js
+++ b/themes/hotel-reservation-theme/js/order-opc.js
@@ -630,8 +630,8 @@ function updatePaymentMethodsDisplay()
function updateAddressSelection(is_adv_api)
{
- var idAddress_delivery = ($('#opc_id_address_delivery').length == 1 ? $('#opc_id_address_delivery').val() : $('#id_address_delivery').val());
- var idAddress_invoice = ($('#opc_id_address_invoice').length == 1 ? $('#opc_id_address_invoice').val() : ($('#addressesAreEquals:checked').length == 1 ? idAddress_delivery : ($('#id_address_invoice').length == 1 ? $('#id_address_invoice').val() : idAddress_delivery)));
+ var idAddress_delivery = $('#opc_id_address_delivery').val();
+ var idAddress_invoice = $('#opc_id_address_invoice').val();
$('#opc_account-overlay').fadeIn('slow');
$('#opc_delivery_methods-overlay').fadeIn('slow');
@@ -912,18 +912,17 @@ function confirmFreeOrder()
url: orderOpcUrl + '?rand=' + new Date().getTime(),
async: true,
cache: false,
- dataType : "html",
+ dataType : 'JSON',
data: 'ajax=true&method=makeFreeOrder&token=' + static_token ,
- success: function(html)
+ success: function(response)
{
- $('#confirmOrder').prop('disabled', false);
- var array_split = html.split(':');
- if (array_split[0] == 'freeorder')
- {
- if (isGuest)
- document.location.href = guestTrackingUrl+'?id_order='+encodeURIComponent(array_split[1])+'&email='+encodeURIComponent(array_split[2]);
- else
- document.location.href = historyUrl;
+ if (response.success) {
+ $('#confirmOrder').prop('disabled', false);
+ if (isGuest) {
+ document.location.href = guestTrackingUrl+'?id_order='+encodeURIComponent(response.reference)+'&email='+encodeURIComponent(response.email);
+ } else {
+ document.location.href = response.order_confirmation_url;
+ }
}
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
diff --git a/themes/hotel-reservation-theme/my-account.tpl b/themes/hotel-reservation-theme/my-account.tpl
index 66570d7aa..4bbc44231 100644
--- a/themes/hotel-reservation-theme/my-account.tpl
+++ b/themes/hotel-reservation-theme/my-account.tpl
@@ -35,20 +35,20 @@
{if $voucherAllowed || isset($HOOK_CUSTOMER_ACCOUNT) && $HOOK_CUSTOMER_ACCOUNT !=''}
diff --git a/themes/hotel-reservation-theme/order-confirmation.tpl b/themes/hotel-reservation-theme/order-confirmation.tpl
index 23ac2a1fa..093669112 100644
--- a/themes/hotel-reservation-theme/order-confirmation.tpl
+++ b/themes/hotel-reservation-theme/order-confirmation.tpl
@@ -42,6 +42,9 @@
{l s='Follow my order'}
{else}
+ {if isset($is_free_order) && $is_free_order}
+
{l s='Your order on %s is complete.' sprintf=$shop_name}
+ {/if}
{l s='Order Status :'} {l s='Confirmed'}
{l s='Order Reference :'} {$order->reference}
{if $any_back_order}
diff --git a/themes/hotel-reservation-theme/order-follow.tpl b/themes/hotel-reservation-theme/order-follow.tpl
index ce1fa0f6b..4b0871ab0 100644
--- a/themes/hotel-reservation-theme/order-follow.tpl
+++ b/themes/hotel-reservation-theme/order-follow.tpl
@@ -31,7 +31,7 @@
{$navigationPipe}
- {l s='Booking Refund Requests'}
+ {l s='Booking refund requests'}
{/capture}
@@ -86,6 +86,6 @@
\ No newline at end of file
diff --git a/themes/hotel-reservation-theme/order-opc.tpl b/themes/hotel-reservation-theme/order-opc.tpl
index 8cdc91e23..817de42dd 100644
--- a/themes/hotel-reservation-theme/order-opc.tpl
+++ b/themes/hotel-reservation-theme/order-opc.tpl
@@ -46,6 +46,8 @@
{* Accordian for all blocks *}
+
+
{if isset($checkout_process_steps) && $checkout_process_steps}
{foreach $checkout_process_steps as $step}
{if $step->step_key == 'checkout_rooms_summary'}
@@ -437,7 +439,6 @@
{$voucher.code|escape:'html':'UTF-8'} - {$voucher.name}
-
{$voucher['description']}
{if not $smarty.foreach.availVoucher.last}
{/if}
@@ -460,7 +461,6 @@
{addJsDef imgDir=$img_dir}
{addJsDef authenticationUrl=$link->getPageLink("authentication", true)|escape:'quotes':'UTF-8'}
{addJsDef orderOpcUrl=$link->getPageLink("order-opc", true)|escape:'quotes':'UTF-8'}
- {addJsDef historyUrl=$link->getPageLink("history", true)|escape:'quotes':'UTF-8'}
{addJsDef guestTrackingUrl=$link->getPageLink("guest-tracking", true)|escape:'quotes':'UTF-8'}
{addJsDef addressUrl=$link->getPageLink("address", true, NULL, "back={$back_order_page}")|escape:'quotes':'UTF-8'}
{addJsDef orderProcess='order-opc'}
diff --git a/themes/hotel-reservation-theme/order-slip.tpl b/themes/hotel-reservation-theme/order-slip.tpl
index 846b25e84..1f4cf0c4b 100644
--- a/themes/hotel-reservation-theme/order-slip.tpl
+++ b/themes/hotel-reservation-theme/order-slip.tpl
@@ -106,7 +106,7 @@
- {l s='Back to your account'}
+ {l s='Back to My account'}
diff --git a/tools/smarty/sysplugins/smarty_internal_method_clearcompiledtemplate.php b/tools/smarty/sysplugins/smarty_internal_method_clearcompiledtemplate.php
index bf4929807..d1b21ee68 100644
--- a/tools/smarty/sysplugins/smarty_internal_method_clearcompiledtemplate.php
+++ b/tools/smarty/sysplugins/smarty_internal_method_clearcompiledtemplate.php
@@ -114,6 +114,11 @@ class Smarty_Internal_Method_ClearCompiledTemplate
$unlink = true;
}
}
+
+ if (substr($_filepath, -9) == 'index.php') {
+ $unlink = false;
+ }
+
if ($unlink && is_file($_filepath) && @unlink($_filepath)) {
$_count++;
if (function_exists('opcache_invalidate')