Fixed: The price tooltip at the order confirmation and updated the design for the booked services and demands popup

This commit is contained in:
vishalsingh.qlo325
2024-08-14 14:38:25 +05:30
parent 023ad837bd
commit bc42e57e7d
5 changed files with 109 additions and 61 deletions

View File

@@ -469,8 +469,6 @@ class OrderConfirmationControllerCore extends FrontController
{
if (Tools::getValue('ajax') != 'true') {
parent::setMedia();
$this->addCSS(_THEME_CSS_DIR_.'history.css');
$this->addJS(_THEME_JS_DIR_.'history.js');
$this->addJS(_THEME_JS_DIR_.'order-confirmation.js');
$this->addCSS(_THEME_CSS_DIR_.'order-confirmation.css');
$this->addJqueryPlugin(array('fancybox')); //fancybox not found for some client theme

View File

@@ -25,53 +25,12 @@
{if (isset($extraDemands) && $extraDemands) || (isset($additionalServices) && $additionalServices)}
<div class="">
<ul class="nav nav-tabs">
{if isset($extraDemands) && $extraDemands}
<li class="active"><a href="#room_type_demands_desc" data-toggle="tab">{l s='Facilities'}</a></li>
{/if}
{if isset($additionalServices) && $additionalServices}
<li{if !isset($extraDemands) || !$extraDemands} class="active"{/if}><a href="#room_type_service_product_desc" data-toggle="tab">{l s='Services'}</a></li>
{/if}
<li {if isset($additionalServices) && $additionalServices} class="active"{/if}><a href="#room_type_service_product_desc" data-toggle="tab">{l s='Services'}</a></li>
<li {if !isset($additionalServices) || !$additionalServices}class="active" {/if}><a href="#room_type_demands_desc" data-toggle="tab">{l s='Facilities'}</a></li>
</ul>
<div class="tab-content">
{if isset($extraDemands) && $extraDemands}
<div id="room_type_demands_desc" class="tab-pane active">
<div class="rooms_extra_demands_head">
<p class="rooms_extra_demands_text">{l s='Facilities chosen for this booking.'}</p>
</div>
{assign var=roomCount value=1}
{foreach $extraDemands as $roomDemand}
<div class="room_demands">
<div class="demand_header">
{l s='Room'} {$roomCount|string_format:'%02d'}&nbsp;
<span>({if {$roomDemand['adults']} <= 9}0{$roomDemand['adults']}{else}{$roomDemand['adults']}{/if} {if $roomDemand['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if $roomDemand['children'] > 0}, {if {$roomDemand['children']} <= 9}0{$roomDemand['children']}{else}{$roomDemand['children']}{/if} {if $roomDemand['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if})</span>
</div>
<div class="room_demand_detail">
{foreach $roomDemand['extra_demands'] as $demand}
<div class="room_demand_block">
<div class="">{$demand['name']|escape:'html':'UTF-8'}</div>
<div class="">
<span>
{if $useTax}
{displayPrice price="{$demand['total_price_tax_incl']|escape:'html':'UTF-8'}" currency=$objOrder->id_currency}
{else}
{displayPrice price="{$demand['total_price_tax_excl']|escape:'html':'UTF-8'}" currency=$objOrder->id_currency}
{/if}
</span>
</div>
</div>
{/foreach}
</div>
</div>
{assign var=roomCount value=$roomCount+1}
{/foreach}
</div>
{/if}
{if isset($additionalServices) && $additionalServices}
<div id="room_type_service_product_desc" class="tab-pane{if !isset($extraDemands) || !$extraDemands} active{/if}">
<div class="rooms_extra_demands_head">
<p class="rooms_extra_demands_text">{l s='Services chosen for this booking.'}</p>
</div>
<div id="room_type_service_product_desc" class="tab-pane {if isset($additionalServices) && $additionalServices}active{/if}">
{if isset($additionalServices) && $additionalServices}
{assign var=roomCount value=1}
{foreach $additionalServices as $key => $roomAdditionalService}
<div class="room_demands">
@@ -105,8 +64,46 @@
</div>
{assign var=roomCount value=$roomCount+1}
{/foreach}
</div>
{/if}
{else}
<div class="services_not_booked">
{l s='No service found.'}
</div>
{/if}
</div>
<div id="room_type_demands_desc" class="tab-pane {if !isset($additionalServices) || !$additionalServices}active{/if}">
{if isset($extraDemands) && $extraDemands}
{assign var=roomCount value=1}
{foreach $extraDemands as $roomDemand}
<div class="room_demands">
<div class="demand_header">
{l s='Room'} {$roomCount|string_format:'%02d'}&nbsp;
<span>({if {$roomDemand['adults']} <= 9}0{$roomDemand['adults']}{else}{$roomDemand['adults']}{/if} {if $roomDemand['adults'] > 1}{l s='Adults'}{else}{l s='Adult'}{/if}{if $roomDemand['children'] > 0}, {if {$roomDemand['children']} <= 9}0{$roomDemand['children']}{else}{$roomDemand['children']}{/if} {if $roomDemand['children'] > 1}{l s='Children'}{else}{l s='Child'}{/if}{/if})</span>
</div>
<div class="room_demand_detail">
{foreach $roomDemand['extra_demands'] as $demand}
<div class="room_demand_block">
<div class="">{$demand['name']|escape:'html':'UTF-8'}</div>
<div class="">
<span>
{if $useTax}
{displayPrice price="{$demand['total_price_tax_incl']|escape:'html':'UTF-8'}" currency=$objOrder->id_currency}
{else}
{displayPrice price="{$demand['total_price_tax_excl']|escape:'html':'UTF-8'}" currency=$objOrder->id_currency}
{/if}
</span>
</div>
</div>
{/foreach}
</div>
</div>
{assign var=roomCount value=$roomCount+1}
{/foreach}
{else}
<div class="services_not_booked">
{l s='No facility found.'}
</div>
{/if}
</div>
</div>
</div>
{/if}

View File

@@ -190,4 +190,24 @@
#rooms_extra_services .nav-tabs > li.active:after {
content: unset;
}
}
#rooms_extra_services .services_not_booked {
text-align: center;
margin: 30px 0px;
font-size: 14px;
}
.price-info-tooltip-cont {
min-width: 180px;
}
.price-info-tooltip-cont .list-row {
display: flex;
justify-content: space-between;
margin: 5px 0;
}
.price-info-tooltip-cont .list-row p {
margin: 0;
}

View File

@@ -750,16 +750,6 @@
display: none;
}
.ui-tooltip.price-tootip {
box-shadow: 0 2px 6px 0 rgb(0 0 0 / 20%);
background: #FFFFFF;
border: unset;
color: #333;
padding: 2px 10px;
max-height: 310px;
overflow-y: auto;
}
.price-info-tooltip-cont {
min-width: 180px;
}
@@ -1084,6 +1074,12 @@
margin-bottom: 12px;
}
#popup-view-extra-services .services_not_booked {
text-align: center;
margin: 30px 0px;
font-size: 14px;
}
/* Guest Tracking page styles - start */
.transform-account .card-text p {
margin: 0;

View File

@@ -70,4 +70,41 @@ $(document).ready(function(){
},
});
});
});
initPriceTooltip();
});
function initPriceTooltip() {
if ($('.order-price-info').length) {
$('.order-price-info').each(function () {
$(this).tooltip({
content: $(this).closest('td').find('.price-info-container').html(),
items: 'span',
trigger: 'hover',
tooltipClass: 'price-tootip',
open: function (event, ui) {
if (typeof (event.originalEvent) === 'undefined') {
return false;
}
var $id = $(ui.tooltip).attr('id');
// close any lingering tooltips
if ($('div.ui-tooltip').not('#' + $id).length) {
return false;
}
},
close: function (event, ui) {
ui.tooltip.hover(function () {
$(this).stop(true).fadeTo(400, 1);
},
function () {
$(this).fadeOut('400', function () {
$(this).remove();
});
});
}
});
});
}
}