diff --git a/modules/hotelreservationsystem/classes/HotelHelper.php b/modules/hotelreservationsystem/classes/HotelHelper.php
index b247b7dce..e883d9aa8 100644
--- a/modules/hotelreservationsystem/classes/HotelHelper.php
+++ b/modules/hotelreservationsystem/classes/HotelHelper.php
@@ -1181,9 +1181,9 @@ class HotelHelper
Configuration::updateValue('PS_MIN_BOOKING_OFFSET', 0);
Configuration::updateValue('HTL_FEATURE_PRICING_PRIORITY', 'specific_date;special_day;date_range');
- Configuration::updateValue('WK_MAX_AMENITIES_ROOM_SEARCH', 0);
- Configuration::updateValue('WK_MAX_FEATURES_ROOM_SEARCH', 0);
- Configuration::updateValue('WK_MAX_ROOM_TYPE_FEATURE_VALUES', 0);
+ Configuration::updateValue('WK_MAX_AMENITIES_ROOM_SEARCH', 6);
+ Configuration::updateValue('WK_MAX_FEATURES_ROOM_SEARCH', 4);
+ Configuration::updateValue('WK_MAX_ROOM_TYPE_FEATURE_VALUES', 4);
Configuration::updateValue('WK_GOOGLE_ACTIVE_MAP', 0);
Configuration::updateValue('WK_MAP_HOTEL_ACTIVE_ONLY', 1);
diff --git a/modules/wkabouthotelblock/views/css/WkAboutHotelBlockFront.css b/modules/wkabouthotelblock/views/css/WkAboutHotelBlockFront.css
index d99418976..bfa9dbf7d 100644
--- a/modules/wkabouthotelblock/views/css/WkAboutHotelBlockFront.css
+++ b/modules/wkabouthotelblock/views/css/WkAboutHotelBlockFront.css
@@ -20,9 +20,6 @@
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
*/
-.htlInterior-owlCarousel .owl-stage-outer {
- border: 1px solid #ccc;
-}
@media (max-width: 767px) {
.htlInterior-owlCarousel .owl-carousel {
width: 100%;
@@ -52,18 +49,6 @@
height: 100%;
object-fit: cover;
}
-.htlInterior-owlCarousel .owl-prev, .htlInterior-owlCarousel .owl-next{
- position: absolute;
- top: 50%;
- transform: translateY(-50%);
- z-index: 10;
-}
-.htlInterior-owlCarousel .owl-prev {
- left: 15px;
-}
-.htlInterior-owlCarousel .owl-next {
- right: 15px;
-}
.nav-direction-wrapper{
display: block;
}
@@ -89,7 +74,7 @@
right: 0;
top: 0;
bottom: 0;
- background-image: url("../img/black-opacity-5.png");
+ background-color: rgba(0, 0, 0, 0.5);
cursor: pointer;
display: none;
}
@@ -106,39 +91,91 @@
vertical-align: middle;
}
-/* Interior gallery below desktop: one wide image over two smaller ones */
-@media (max-width: 1199px) {
- #hotelInteriorBlock .interiorImgWrapper {
- display: grid;
- grid-template-columns: 1fr 1fr;
- gap: 4px;
- }
- #hotelInteriorBlock .interiorbox {
- padding-bottom: 75%;
- }
- #hotelInteriorBlock .interiorbox:first-child {
- grid-column: 1 / -1;
- padding-bottom: 56.25%;
- }
- #hotelInteriorBlock .interiorboxInner {
- border: 0;
- }
- .htlInterior-owlCarousel .owl-stage-outer {
- border: 0;
+/* gallery: pages of 8 square photos (4 x 2) with dots below */
+.htlInterior-owlCarousel .owl-stage-outer {
+ border: 0;
+}
+.interiorImgWrapper {
+ display: grid;
+ grid-template-columns: repeat(4, 1fr);
+ gap: 8px;
+ height: auto;
+}
+.interiorbox {
+ padding-bottom: 100%;
+}
+.interiorboxInner {
+ border: 0;
+ border-radius: 3px;
+}
+@media (max-width: 575px) {
+ .interiorImgWrapper {
+ grid-template-columns: repeat(2, 1fr);
}
}
-.htlInterior-owlCarousel .nav-direction-secondary {
- width: 36px;
- height: 36px;
- padding: 0;
+.htlInterior-owlCarousel .owl-dots {
display: flex;
- align-items: center;
justify-content: center;
+ gap: 6px;
+ margin-top: 24px;
}
-.htlInterior-owlCarousel .owl-prev {
- left: 8px;
+.htlInterior-owlCarousel .owl-dots .owl-dot span {
+ display: block;
+ width: 7px;
+ height: 7px;
+ margin: 0;
+ border-radius: 50%;
+ background: #C4C4C4;
}
-.htlInterior-owlCarousel .owl-next {
- right: 8px;
+.htlInterior-owlCarousel .owl-dots .owl-dot.active span {
+ background: #333;
+}
+/* touch screens have no hover, so always show the zoom badge */
+@media (hover: none) {
+ #hotelInteriorBlock .interiorbox::after {
+ content: "\f00e";
+ font-family: "FontAwesome";
+ position: absolute;
+ right: 8px;
+ top: 8px;
+ width: 28px;
+ height: 28px;
+ border-radius: 50%;
+ background: rgba(0, 0, 0, .45);
+ color: #fff;
+ font-size: 14px;
+ line-height: 28px;
+ text-align: center;
+ pointer-events: none;
+ }
}
+/* gallery lightbox: square photo, dark overlay, thumbnail strip with round prev/next at the bottom */
+html body .htl-gallery-fancybox .fancybox-skin { padding: 0 !important; background: transparent; border-radius: 5px; box-shadow: none; }
+html body .htl-gallery-fancybox .fancybox-outer, html body .htl-gallery-fancybox .fancybox-inner { border-radius: 5px; overflow: hidden; }
+html body .htl-gallery-fancybox .fancybox-image { border-radius: 5px; }
+html body .htl-gallery-fancybox .fancybox-title { display: none !important; }
+.htl-gal-thumbs { position: fixed; left: 0; right: 0; bottom: 49px; z-index: 8040; display: flex; align-items: center; gap: 16px; padding: 0 28px; }
+.htl-gal-thumbs__track { flex: 1 1 auto; display: flex; gap: 12px; overflow-x: auto; scroll-behavior: smooth; scrollbar-width: none; padding: 2px 0; }
+.htl-gal-thumbs__track::-webkit-scrollbar { display: none; }
+.htl-gal-thumbs__item { flex: 0 0 auto; width: 96px; height: 96px; padding: 0; border: 2px solid transparent; border-radius: 2px; background: #000; overflow: hidden; opacity: .6; cursor: pointer; transition: opacity .2s ease, border-color .2s ease; }
+.htl-gal-thumbs__item img { display: block; width: 100%; height: 100%; object-fit: cover; }
+.htl-gal-thumbs__item:hover, .htl-gal-thumbs__item.is-active { opacity: 1; }
+.htl-gal-thumbs__item.is-active { border-color: #fff; }
+.htl-gal-thumbs__nav { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: #333; font-size: 26px; line-height: 1; box-shadow: 0 2px 10px rgba(0, 0, 0, .3); cursor: pointer; transition: transform .2s ease; }
+.htl-gal-thumbs__nav i { display: block; line-height: 1; }
+.htl-gal-thumbs__nav:hover { transform: scale(1.08); }
+@media (max-width: 767px) {
+ .htl-gal-thumbs { bottom: 20px; padding: 0 12px; gap: 8px; }
+ .htl-gal-thumbs__item { width: 60px; height: 60px; }
+ .htl-gal-thumbs__nav { width: 36px; height: 36px; font-size: 20px; }
+ html body .htl-gallery-fancybox .fancybox-close { top: 8px; right: 8px; }
+}
+html body .fancybox-overlay.htl-gallery-overlay { opacity: 1 !important; background: rgba(43, 43, 43, 0.95) !important; }
+/* short landscape screens (phones turned sideways): compact thumbnail strip */
+@media (max-height: 499px) {
+ .htl-gal-thumbs { bottom: 10px; padding: 0 12px; gap: 8px; }
+ .htl-gal-thumbs__item { width: 56px; height: 56px; }
+ .htl-gal-thumbs__nav { width: 36px; height: 36px; font-size: 20px; }
+ html body .htl-gallery-fancybox .fancybox-close { top: 8px; right: 8px; }
+}
diff --git a/modules/wkabouthotelblock/views/js/WkAboutHotelBlockFront.js b/modules/wkabouthotelblock/views/js/WkAboutHotelBlockFront.js
index 331cd5051..471873b77 100644
--- a/modules/wkabouthotelblock/views/js/WkAboutHotelBlockFront.js
+++ b/modules/wkabouthotelblock/views/js/WkAboutHotelBlockFront.js
@@ -23,10 +23,8 @@
$(document).ready(function(){
$('.htlInterior-owlCarousel .owl-carousel').owlCarousel({
loop:true,
- nav:true,
- navSpeed:1000,
- navText:['
',''],
- dots:false,
+ nav:false,
+ dots:true,
items: 1,
autoHeight:true,
autoplay:true,
@@ -34,15 +32,7 @@ $(document).ready(function(){
autoplayTimeout:5000,
autoplayHoverPause:true,
responsiveClass:true,
- rtl: language_is_rtl,
- responsive:{
- 1200:{
- items:3
- },
- 480:{
- items:2
- },
- }
+ rtl: language_is_rtl
});
$('.interiorbox').on('mouseenter', function(){
@@ -52,20 +42,100 @@ $(document).ready(function(){
$(this).find('div.interiorHoverBlockWrapper').hide();
});
- $("div.interiorbox").fancybox({
- autoDimensions: true,
- autoScale: true,
- autoSize: true,
- centerOnScroll: true,
- height: 'auto',
- scrolling: 'auto',
- width: 'auto',
- maxWidth: 700,
- 'hideOnContentClick': false,
- helpers: {
- overlay: {
- locked: false
- }
- }
- });
-});
\ No newline at end of file
+ // gallery lightbox: fancybox with a thumbnail strip and round prev/next buttons at the bottom
+ var $thumbs = null;
+
+ function buildThumbs() {
+ var group = $.fancybox.group || [];
+ if (group.length < 2) {
+ return;
+ }
+ $thumbs = $('');
+ var $track = $thumbs.find('.htl-gal-thumbs__track');
+ $.each(group, function(i, item) {
+ $('')
+ .attr('aria-label', (i + 1) + ' / ' + group.length)
+ .append($('
').attr('src', item.href))
+ .on('click', function() { this.blur(); $.fancybox.jumpto(i); })
+ .appendTo($track);
+ });
+ $thumbs.find('.htl-gal-thumbs__prev').on('click', function() { this.blur(); $.fancybox.prev(); });
+ $thumbs.find('.htl-gal-thumbs__next').on('click', function() { this.blur(); $.fancybox.next(); });
+ $thumbs.appendTo('body');
+ }
+
+ function markActiveThumb() {
+ if (!$thumbs) {
+ return;
+ }
+ var $items = $thumbs.find('.htl-gal-thumbs__item').removeClass('is-active');
+ var $active = $items.eq($.fancybox.current.index).addClass('is-active');
+ var track = $thumbs.find('.htl-gal-thumbs__track').get(0);
+ if ($active.length && track) {
+ track.scrollLeft = $active.get(0).offsetLeft - (track.clientWidth - $active.outerWidth()) / 2;
+ }
+ }
+
+ // photos are listed once, the slider also holds cloned copies when it loops
+ $(document).on('click', '.htlInterior-owlCarousel .interiorbox[href]', function(e) {
+ e.preventDefault();
+ var items = [];
+ var index = 0;
+ var clicked = $(e.currentTarget).attr('href');
+ $('.htlInterior-owlCarousel .owl-item:not(.cloned) .interiorbox[href]').each(function(i) {
+ items.push({href: $(this).attr('href'), title: $(this).attr('title') || ''});
+ if ($(this).attr('href') === clicked) {
+ index = i;
+ }
+ });
+ $.fancybox.open(items, {
+ index: index,
+ type: 'image',
+ padding: 0,
+ margin: [48, 48, 190, 48],
+ wrapCSS: 'htl-gallery-fancybox',
+ arrows: false,
+ openEffect: 'fade',
+ closeEffect: 'fade',
+ helpers: {
+ overlay: {
+ locked: false,
+ css: {background: 'rgba(43, 43, 43, 0.9)'}
+ }
+ },
+ beforeLoad: function() {
+ var compact = window.innerWidth < 768 || window.innerHeight < 500;
+ this.margin = window.innerHeight < 500 ? [36, 12, 84, 12] : (compact ? [48, 12, 110, 12] : [48, 48, 190, 48]);
+ },
+ afterLoad: function() {
+ // photos are shown as large as the screen allows (up to 589px), not at their natural size
+ var smallW = window.innerWidth < 768;
+ var shortH = window.innerHeight < 500;
+ var maxH = Math.min(window.innerHeight - (shortH ? 120 : (smallW ? 158 : 238)), 589);
+ var maxW = window.innerWidth - (shortH || smallW ? 24 : 96);
+ var ratio = this.width / this.height;
+ var height = maxH;
+ var width = height * ratio;
+ if (width > maxW) {
+ width = maxW;
+ height = width / ratio;
+ }
+ this.width = Math.round(width);
+ this.height = Math.round(height);
+ },
+ beforeShow: function() {
+ $('.fancybox-overlay').addClass('htl-gallery-overlay');
+ if (!$thumbs) {
+ buildThumbs();
+ }
+ },
+ afterShow: markActiveThumb,
+ afterClose: function() {
+ if ($thumbs) {
+ $thumbs.remove();
+ $thumbs = null;
+ }
+ }
+ });
+ });
+});
diff --git a/modules/wkabouthotelblock/views/templates/hook/hotelInteriorBlock.tpl b/modules/wkabouthotelblock/views/templates/hook/hotelInteriorBlock.tpl
index 80ffe6f25..abfc3308a 100644
--- a/modules/wkabouthotelblock/views/templates/hook/hotelInteriorBlock.tpl
+++ b/modules/wkabouthotelblock/views/templates/hook/hotelInteriorBlock.tpl
@@ -44,9 +44,8 @@
- {assign var='intImgIteration' value=0}
{foreach from=$InteriorImg item=img_name name=intImg}
- {if $smarty.foreach.intImg.iteration%3 == 1}
+ {if $smarty.foreach.intImg.iteration%8 == 1}
{/if}
@@ -61,22 +60,10 @@
- {if $smarty.foreach.intImg.iteration%3 == 0}
+ {if $smarty.foreach.intImg.iteration%8 == 0 || $smarty.foreach.intImg.last}
{/if}
- {assign var='intImgIteration' value=$smarty.foreach.intImg.iteration}
{/foreach}
- {if $intImgIteration%3}
- {assign var='intImgLeft' value=3-($intImgIteration%3)}
- {for $foo=1 to $intImgLeft}
-
-
-

-
-
- {/for}
-
- {/if}
diff --git a/modules/wkabouthotelblock/wkabouthotelblock.php b/modules/wkabouthotelblock/wkabouthotelblock.php
index 18dd7ac13..422c46239 100644
--- a/modules/wkabouthotelblock/wkabouthotelblock.php
+++ b/modules/wkabouthotelblock/wkabouthotelblock.php
@@ -47,6 +47,7 @@ class WkAboutHotelBlock extends Module
public function hookDisplayHome()
{
+ $this->context->controller->addJqueryPlugin('fancybox');
$this->context->controller->addCSS(_PS_JS_DIR_.'owl-carousel/assets/owl.carousel.min.css');
$this->context->controller->addCSS(_PS_JS_DIR_.'owl-carousel/assets/owl.theme.default.min.css');
$this->context->controller->addJS(_PS_JS_DIR_.'owl-carousel/owl.carousel.min.js');
diff --git a/modules/wkhotelfilterblock/views/js/wkhotelfilterblock.js b/modules/wkhotelfilterblock/views/js/wkhotelfilterblock.js
index bfa546c65..4c1dd5f6b 100644
--- a/modules/wkhotelfilterblock/views/js/wkhotelfilterblock.js
+++ b/modules/wkhotelfilterblock/views/js/wkhotelfilterblock.js
@@ -132,6 +132,7 @@ $(document).ready(function()
triggerFilter(1, 0, 0, 0);
$('.filter').on('click', function()
{
+ $(this).parent().toggleClass('checked', this.checked);
triggerFilter();
});
@@ -202,4 +203,47 @@ $(document).ready(function()
});
return 1;
}
+ var $conts = $('#filter_results > .col-sm-12 > .layered_filter_cont');
+ if ($conts.length) {
+ var $nav = $('');
+ $conts.each(function () {
+ $nav.append($('').text($(this).find('.lf_headingmain_wrapper span').first().text()).append(''));
+ });
+ $('#filter_results > .col-sm-12').prepend($nav);
+
+ var $sheet = $('');
+ $('.sort_result').each(function () {
+ $sheet.find('ul').append($('').text($(this).text()).data('source', $(this)));
+ });
+ var $bar = $('');
+ $('body').append($sheet, $bar);
+
+ function selectTab(i) {
+ $nav.children().removeClass('mf_active').eq(i).addClass('mf_active');
+ $conts.removeClass('mf_active').eq(i).addClass('mf_active');
+ }
+ selectTab(0);
+
+ function updateCounts() {
+ var total = 0;
+ $conts.each(function (i) {
+ var n = $(this).find('input.filter:checked').length;
+ var v = $(this).find('#filter_price_silder').length ? $('#filter_price_silder').slider('values') : 0;
+ n += v && (v[0] != min_price || v[1] != max_price) ? 1 : 0;
+ total += n;
+ $nav.children().eq(i).children('b').text(n || '');
+ });
+ $bar.find('.mf_filter b').text(total || '');
+ }
+ $(document).on('click change slidechange', '#filter_results', function () { setTimeout(updateCounts, 50); });
+
+ $nav.on('click', '.mf_tab', function () { selectTab($(this).index()); });
+ $bar.find('.mf_filter').on('click', function () { $('body').addClass('mf_filter_open'); });
+ $bar.find('.mf_sort').on('click', function () { $sheet.addClass('mf_open'); });
+ $('.mf_back, .mf_apply').on('click', function () { $('body').removeClass('mf_filter_open'); });
+ $('.mf_clear_all').on('click', function () { $('.clear_filter').trigger('click'); });
+ $sheet.on('click', function (e) { if (e.target === this || $(e.target).is('button')) $sheet.removeClass('mf_open'); });
+ $sheet.on('click', 'li', function () { $(this).addClass('mf_selected').siblings().removeClass('mf_selected').end().data('source').trigger('click'); $sheet.removeClass('mf_open'); });
+ $sheet.find('li').first().addClass('mf_selected');
+ }
});
\ No newline at end of file
diff --git a/modules/wkhotelfilterblock/views/templates/hook/htlfilterblock.tpl b/modules/wkhotelfilterblock/views/templates/hook/htlfilterblock.tpl
index 0fab3ecf3..807b7c23e 100644
--- a/modules/wkhotelfilterblock/views/templates/hook/htlfilterblock.tpl
+++ b/modules/wkhotelfilterblock/views/templates/hook/htlfilterblock.tpl
@@ -22,6 +22,12 @@
{block name='room_types_filters_block'}
+ {* mobile only: header of the full screen filters panel *}
+
{block name='room_types_price_filter'}
{if isset($config) && $config['SHOW_PRICE_FILTER']}
@@ -61,7 +67,7 @@
{foreach $all_amenities as $amenity}
{/foreach}
@@ -86,7 +92,7 @@
{foreach $feature.values as $featureValue}
{/foreach}
@@ -96,6 +102,9 @@
{/if}
{/block}
+ {block name='room_types_filters_mobile_apply'}
+
+ {/block}
{block name='room_types_filters_js_vars'}
{strip}
@@ -108,6 +117,9 @@
{addJsDef max_price = $max_price}
{addJsDef warning_num = $warning_num}
+ {addJsDefL name=mfSortTxt}{l s='Sort' js=1 mod='wkhotelfilterblock'}{/addJsDefL}
+ {addJsDefL name=mfSortByTxt}{l s='Sort by' js=1 mod='wkhotelfilterblock'}{/addJsDefL}
+ {addJsDefL name=mfFilterTxt}{l s='Filter' js=1 mod='wkhotelfilterblock'}{/addJsDefL}
{addJsDefL name=viewMoreTxt}{l s='View More' js=1 mod='wkhotelfilterblock'}{/addJsDefL}
{addJsDefL name=bookNowTxt}{l s='Book Now' js=1 mod='wkhotelfilterblock'}{/addJsDefL}
{/strip}
diff --git a/modules/wkhotelroom/views/css/WkHotelRoomBlockFront.css b/modules/wkhotelroom/views/css/WkHotelRoomBlockFront.css
index c8a0d6286..88645f271 100644
--- a/modules/wkhotelroom/views/css/WkHotelRoomBlockFront.css
+++ b/modules/wkhotelroom/views/css/WkHotelRoomBlockFront.css
@@ -138,7 +138,8 @@ a.htlRoomTypeBookNow {
display: flex;
flex-wrap: wrap;
gap: 6px 16px;
- padding: 0 0 12px;
+ padding: 16px 0;
+ border-bottom: 1px solid #E5E5E5;
color: #555;
font-size: 15px;
}
@@ -172,7 +173,6 @@ a.htlRoomTypeBookNow {
justify-content: space-between;
gap: 10px;
padding: 12px 0;
- border-top: 1px solid #E5E5E5;
border-bottom: 1px solid #E5E5E5;
color: #555;
font-size: 15px;
diff --git a/modules/wkhotelroom/views/templates/hook/hotelRoomDisplayBlock.tpl b/modules/wkhotelroom/views/templates/hook/hotelRoomDisplayBlock.tpl
index a8a286ffb..e7abd0767 100644
--- a/modules/wkhotelroom/views/templates/hook/hotelRoomDisplayBlock.tpl
+++ b/modules/wkhotelroom/views/templates/hook/hotelRoomDisplayBlock.tpl
@@ -54,18 +54,7 @@
{block name='hotel_room_block_room_type_description'}
{$roomDisplay.name|escape:'htmlall':'UTF-8'}
- {if $roomDisplay.feature}
-
- {foreach from=$roomDisplay.feature item=feat}
-
- {if $feat.logo_type == 'icon'}{else}
{/if}
- {$feat.value|escape:'htmlall':'UTF-8'}
-
- {/foreach}
-
- {/if}
- {$roomDisplay.max_adults|intval} {l s='Adults' mod='wkhotelroom'}{if $roomDisplay.max_children}, {$roomDisplay.max_children|intval} {if $roomDisplay.max_children > 1}{l s='Children' mod='wkhotelroom'}{else}{l s='Child' mod='wkhotelroom'}{/if}{/if}
{if $roomDisplay.amenities}
{foreach from=$roomDisplay.amenities item=amenity}
@@ -78,6 +67,16 @@
{/if}
+ {if $roomDisplay.feature}
+
+ {foreach from=$roomDisplay.feature item=feat}
+
+ {if $feat.logo_type == 'icon'}{else}
{/if}
+ {$feat.value|escape:'htmlall':'UTF-8'}
+
+ {/foreach}
+
+ {/if}
{/block}