Merge branch 'develop' into gli-1933
This commit is contained in:
@@ -84,14 +84,20 @@
|
||||
@import "partials/date-range-picker"
|
||||
@import "partials/multistore"
|
||||
@import "partials/product"
|
||||
@import "partials/skeleton-loading"
|
||||
|
||||
//Controllers
|
||||
@import "controllers/carrier-wizard"
|
||||
@import "controllers/dashboard"
|
||||
@import "controllers/login"
|
||||
@import "controllers/modules_catalog"
|
||||
@import "controllers/modules"
|
||||
@import "controllers/search"
|
||||
@import "controllers/translations"
|
||||
@import "controllers/customer-thread"
|
||||
@import "controllers/themes"
|
||||
@import "controllers/order"
|
||||
@import "controllers/products"
|
||||
@import "vendor/bootstrap-rtl-sass/bootstrap-rtl"
|
||||
|
||||
//Plug-ins
|
||||
@@ -99,6 +105,9 @@
|
||||
@import "partials/growl"
|
||||
@import "partials/chosen"
|
||||
@import "partials/ladda"
|
||||
@import "partials/date-picker"
|
||||
@import "partials/select2"
|
||||
@import "partials/ndv3"
|
||||
|
||||
//RTL
|
||||
@import "partials/rtl"
|
||||
@@ -106,3 +115,5 @@
|
||||
//Backward compatibility
|
||||
@import "partials/backward"
|
||||
|
||||
//Print support
|
||||
@import "partials/print"
|
||||
|
||||
@@ -53,10 +53,12 @@
|
||||
.module-info-wrapper
|
||||
position: relative
|
||||
height: 100%
|
||||
.module-logo img
|
||||
max-height: 60px
|
||||
.module-logo
|
||||
display: flex
|
||||
gap: 10px
|
||||
margin-bottom: 20px
|
||||
margin-right: 10px
|
||||
img
|
||||
max-height: 60px
|
||||
.panel-action
|
||||
.module-price
|
||||
font-size: 14px
|
||||
|
||||
@@ -3,6 +3,7 @@ $kpi-gap: 10px
|
||||
|
||||
.kpi-container
|
||||
display: flex
|
||||
gap: 15px
|
||||
justify-content: space-between
|
||||
padding: 12px !important
|
||||
.kpis-wrap
|
||||
@@ -23,7 +24,6 @@ $kpi-gap: 10px
|
||||
padding-right: $kpi-gap / 2
|
||||
.actions-wrap
|
||||
width: 16px
|
||||
margin-left: 16px
|
||||
button
|
||||
padding: 0
|
||||
border: none
|
||||
@@ -97,11 +97,21 @@ $kpi-gap: 10px
|
||||
border: 1px solid #e7edfa
|
||||
border-left-width: 3px
|
||||
border-radius: 6px
|
||||
padding: 4px 8px 8px 42px
|
||||
padding: 4px 8px 8px 4px
|
||||
display: flex
|
||||
flex-direction: column
|
||||
justify-content: space-between
|
||||
gap: 10px
|
||||
white-space: normal
|
||||
i.kpi-icon
|
||||
font-size: 15px
|
||||
text-align: center
|
||||
color: white
|
||||
line-height: 26px
|
||||
background: #eee
|
||||
width: 28px
|
||||
height: 28px
|
||||
@include border-radius(6px)
|
||||
.kpi-data
|
||||
flex-grow: 1
|
||||
.title-subtitle
|
||||
display: flex
|
||||
justify-content: space-between
|
||||
@@ -109,22 +119,7 @@ $kpi-gap: 10px
|
||||
display: block
|
||||
color: #666
|
||||
font-size: 13px
|
||||
i
|
||||
position: absolute
|
||||
top: 5px
|
||||
font-size: 15px
|
||||
text-align: center
|
||||
color: white
|
||||
line-height: 26px
|
||||
background: #eee
|
||||
width: 28px
|
||||
height: 28px
|
||||
@include left(5px)
|
||||
@include border-radius(6px)
|
||||
&::before
|
||||
position: absolute
|
||||
top: 1px
|
||||
left: 8px
|
||||
|
||||
.subtitle
|
||||
display: block
|
||||
text-transform: capitalize
|
||||
@@ -144,12 +139,8 @@ $kpi-gap: 10px
|
||||
&.loading
|
||||
height: 22px
|
||||
min-width: 40px
|
||||
.arrow
|
||||
position: absolute
|
||||
bottom: 7px
|
||||
right: 9px
|
||||
i
|
||||
color: #828282 !important
|
||||
.arrow i
|
||||
color: #828282 !important
|
||||
&:hover
|
||||
text-decoration: none
|
||||
.color1
|
||||
|
||||
@@ -119,3 +119,8 @@ html
|
||||
margin-left: 0px
|
||||
@include border-right(1px solid $sidebar-menu-bg-hover-color)
|
||||
border-left: 0px
|
||||
#nav-topbar
|
||||
#ellipsistab
|
||||
ul#ellipsis_submenu
|
||||
left: 0
|
||||
right: unset
|
||||
|
||||
@@ -62,4 +62,8 @@
|
||||
.tree-panel-label-title
|
||||
font-weight: 400
|
||||
margin: 0
|
||||
@include padding(0, 0, 0, 8px)
|
||||
@include padding(0, 0, 0, 8px)
|
||||
|
||||
.tree.cattree
|
||||
max-height: 350px
|
||||
overflow-y: auto
|
||||
|
||||
@@ -2,14 +2,8 @@
|
||||
// Button groups
|
||||
// --------------------------------------------------
|
||||
|
||||
// Make the div behave like a button
|
||||
.btn-group,
|
||||
.btn-group-vertical
|
||||
> .btn
|
||||
float: right
|
||||
|
||||
// Prevent double borders when buttons are next to each other
|
||||
.btn-group
|
||||
.btn-group
|
||||
.btn + .btn,
|
||||
.btn + .btn-group,
|
||||
.btn-group + .btn,
|
||||
|
||||
@@ -187,28 +187,42 @@
|
||||
.col-sm-push-11
|
||||
right: percentage((11/ $grid-columns))
|
||||
|
||||
.col-sm-pull-0
|
||||
left: auto
|
||||
right: auto
|
||||
.col-sm-pull-1
|
||||
left: percentage((1 / $grid-columns))
|
||||
right: auto
|
||||
.col-sm-pull-2
|
||||
left: percentage((2 / $grid-columns))
|
||||
right: auto
|
||||
.col-sm-pull-3
|
||||
left: percentage((3 / $grid-columns))
|
||||
right: auto
|
||||
.col-sm-pull-4
|
||||
left: percentage((4 / $grid-columns))
|
||||
right: auto
|
||||
.col-sm-pull-5
|
||||
left: percentage((5 / $grid-columns))
|
||||
right: auto
|
||||
.col-sm-pull-6
|
||||
left: percentage((6 / $grid-columns))
|
||||
right: auto
|
||||
.col-sm-pull-7
|
||||
left: percentage((7 / $grid-columns))
|
||||
right: auto
|
||||
.col-sm-pull-8
|
||||
left: percentage((8 / $grid-columns))
|
||||
right: auto
|
||||
.col-sm-pull-9
|
||||
left: percentage((9 / $grid-columns))
|
||||
right: auto
|
||||
.col-sm-pull-10
|
||||
left: percentage((10/ $grid-columns))
|
||||
right: auto
|
||||
.col-sm-pull-11
|
||||
left: percentage((11/ $grid-columns))
|
||||
right: auto
|
||||
|
||||
// Offsets
|
||||
.col-sm-offset-1
|
||||
@@ -269,23 +283,23 @@
|
||||
.col-md-10,
|
||||
.col-md-11
|
||||
float: right
|
||||
.col-md-1
|
||||
.col-md-1
|
||||
width: percentage((1 / $grid-columns))
|
||||
.col-md-2
|
||||
.col-md-2
|
||||
width: percentage((2 / $grid-columns))
|
||||
.col-md-3
|
||||
.col-md-3
|
||||
width: percentage((3 / $grid-columns))
|
||||
.col-md-4
|
||||
.col-md-4
|
||||
width: percentage((4 / $grid-columns))
|
||||
.col-md-5
|
||||
.col-md-5
|
||||
width: percentage((5 / $grid-columns))
|
||||
.col-md-6
|
||||
.col-md-6
|
||||
width: percentage((6 / $grid-columns))
|
||||
.col-md-7
|
||||
.col-md-7
|
||||
width: percentage((7 / $grid-columns))
|
||||
.col-md-8
|
||||
.col-md-8
|
||||
width: percentage((8 / $grid-columns))
|
||||
.col-md-9
|
||||
.col-md-9
|
||||
width: percentage((9 / $grid-columns))
|
||||
.col-md-10
|
||||
width: percentage((10/ $grid-columns))
|
||||
@@ -318,28 +332,42 @@
|
||||
.col-md-push-11
|
||||
right: percentage((11/ $grid-columns))
|
||||
|
||||
.col-md-pull-0
|
||||
left: auto
|
||||
right: auto
|
||||
.col-md-pull-1
|
||||
left: percentage((1 / $grid-columns))
|
||||
right: auto
|
||||
.col-md-pull-2
|
||||
left: percentage((2 / $grid-columns))
|
||||
right: auto
|
||||
.col-md-pull-3
|
||||
left: percentage((3 / $grid-columns))
|
||||
right: auto
|
||||
.col-md-pull-4
|
||||
left: percentage((4 / $grid-columns))
|
||||
right: auto
|
||||
.col-md-pull-5
|
||||
left: percentage((5 / $grid-columns))
|
||||
right: auto
|
||||
.col-md-pull-6
|
||||
left: percentage((6 / $grid-columns))
|
||||
right: auto
|
||||
.col-md-pull-7
|
||||
left: percentage((7 / $grid-columns))
|
||||
right: auto
|
||||
.col-md-pull-8
|
||||
left: percentage((8 / $grid-columns))
|
||||
right: auto
|
||||
.col-md-pull-9
|
||||
left: percentage((9 / $grid-columns))
|
||||
right: auto
|
||||
.col-md-pull-10
|
||||
left: percentage((10/ $grid-columns))
|
||||
right: auto
|
||||
.col-md-pull-11
|
||||
left: percentage((11/ $grid-columns))
|
||||
right: auto
|
||||
|
||||
// Offsets
|
||||
.col-md-offset-1
|
||||
@@ -402,77 +430,92 @@
|
||||
.col-lg-11
|
||||
float: right
|
||||
|
||||
.col-lg-1
|
||||
.col-lg-1
|
||||
width: percentage((1 / $grid-columns))
|
||||
.col-lg-2
|
||||
.col-lg-2
|
||||
width: percentage((2 / $grid-columns))
|
||||
.col-lg-3
|
||||
.col-lg-3
|
||||
width: percentage((3 / $grid-columns))
|
||||
.col-lg-4
|
||||
.col-lg-4
|
||||
width: percentage((4 / $grid-columns))
|
||||
.col-lg-5
|
||||
.col-lg-5
|
||||
width: percentage((5 / $grid-columns))
|
||||
.col-lg-6
|
||||
.col-lg-6
|
||||
width: percentage((6 / $grid-columns))
|
||||
.col-lg-7
|
||||
.col-lg-7
|
||||
width: percentage((7 / $grid-columns))
|
||||
.col-lg-8
|
||||
.col-lg-8
|
||||
width: percentage((8 / $grid-columns))
|
||||
.col-lg-9
|
||||
.col-lg-9
|
||||
width: percentage((9 / $grid-columns))
|
||||
.col-lg-10
|
||||
.col-lg-10
|
||||
width: percentage((10/ $grid-columns))
|
||||
.col-lg-11
|
||||
.col-lg-11
|
||||
width: percentage((11/ $grid-columns))
|
||||
.col-lg-12
|
||||
.col-lg-12
|
||||
width: 100%
|
||||
|
||||
// Push and pull columns for source order changes
|
||||
.col-lg-push-1
|
||||
.col-lg-push-1
|
||||
right: percentage((1 / $grid-columns))
|
||||
.col-lg-push-2
|
||||
.col-lg-push-2
|
||||
right: percentage((2 / $grid-columns))
|
||||
.col-lg-push-3
|
||||
.col-lg-push-3
|
||||
right: percentage((3 / $grid-columns))
|
||||
.col-lg-push-4
|
||||
.col-lg-push-4
|
||||
right: percentage((4 / $grid-columns))
|
||||
.col-lg-push-5
|
||||
.col-lg-push-5
|
||||
right: percentage((5 / $grid-columns))
|
||||
.col-lg-push-6
|
||||
.col-lg-push-6
|
||||
right: percentage((6 / $grid-columns))
|
||||
.col-lg-push-7
|
||||
.col-lg-push-7
|
||||
right: percentage((7 / $grid-columns))
|
||||
.col-lg-push-8
|
||||
.col-lg-push-8
|
||||
right: percentage((8 / $grid-columns))
|
||||
.col-lg-push-9
|
||||
.col-lg-push-9
|
||||
right: percentage((9 / $grid-columns))
|
||||
.col-lg-push-10
|
||||
right: percentage((10/ $grid-columns))
|
||||
.col-lg-push-11
|
||||
right: percentage((11/ $grid-columns))
|
||||
|
||||
.col-lg-pull-1
|
||||
.col-lg-pull-0
|
||||
left: auto
|
||||
right: auto
|
||||
.col-lg-pull-1
|
||||
left: percentage((1 / $grid-columns))
|
||||
.col-lg-pull-2
|
||||
right: auto
|
||||
.col-lg-pull-2
|
||||
left: percentage((2 / $grid-columns))
|
||||
.col-lg-pull-3
|
||||
right: auto
|
||||
.col-lg-pull-3
|
||||
left: percentage((3 / $grid-columns))
|
||||
.col-lg-pull-4
|
||||
right: auto
|
||||
.col-lg-pull-4
|
||||
left: percentage((4 / $grid-columns))
|
||||
.col-lg-pull-5
|
||||
right: auto
|
||||
.col-lg-pull-5
|
||||
left: percentage((5 / $grid-columns))
|
||||
.col-lg-pull-6
|
||||
right: auto
|
||||
.col-lg-pull-6
|
||||
left: percentage((6 / $grid-columns))
|
||||
.col-lg-pull-7
|
||||
right: auto
|
||||
.col-lg-pull-7
|
||||
left: percentage((7 / $grid-columns))
|
||||
.col-lg-pull-8
|
||||
right: auto
|
||||
right: unset
|
||||
.col-lg-pull-8
|
||||
left: percentage((8 / $grid-columns))
|
||||
.col-lg-pull-9
|
||||
right: auto
|
||||
.col-lg-pull-9
|
||||
left: percentage((9 / $grid-columns))
|
||||
right: auto
|
||||
.col-lg-pull-10
|
||||
left: percentage((10/ $grid-columns))
|
||||
right: auto
|
||||
.col-lg-pull-11
|
||||
left: percentage((11/ $grid-columns))
|
||||
right: auto
|
||||
|
||||
// Offsets
|
||||
.col-lg-offset-1
|
||||
|
||||
@@ -118,7 +118,7 @@ h1, h2, h3, h4, h5, h6,
|
||||
border-radius: $border-radius-base $border-radius-base 0 0
|
||||
|
||||
// pulling this in mainly for less shorthand
|
||||
&.nav-justified
|
||||
&.nav-justified
|
||||
@extend .nav-justified
|
||||
@extend .nav-tabs-justified
|
||||
|
||||
@@ -169,9 +169,9 @@ h1, h2, h3, h4, h5, h6,
|
||||
|
||||
// The dropdown menu (ul)
|
||||
.dropdown-menu
|
||||
right: 0
|
||||
float: left
|
||||
left: auto
|
||||
right: unset
|
||||
float: right
|
||||
left: 0
|
||||
|
||||
// Aligns the dropdown menu to left
|
||||
&.pull-left
|
||||
@@ -185,6 +185,11 @@ h1, h2, h3, h4, h5, h6,
|
||||
float: right
|
||||
right: auto
|
||||
|
||||
.pull-right > .dropdown-menu
|
||||
right: unset
|
||||
float: right
|
||||
left: 0
|
||||
|
||||
// Right aligned menus need alt position
|
||||
.navbar-nav.pull-left > li > .dropdown-menu,
|
||||
.navbar-nav > li > .dropdown-menu.pull-left
|
||||
@@ -338,13 +343,13 @@ h1, h2, h3, h4, h5, h6,
|
||||
|
||||
// Popovers
|
||||
// -------------------------
|
||||
.popover.top,
|
||||
.popover.top,
|
||||
.popover.bottom
|
||||
direction:ltr
|
||||
|
||||
.popover.top .popover-title,
|
||||
.popover.top .popover-title,
|
||||
.popover.top .popover-content,
|
||||
.popover.bottom .popover-title,
|
||||
.popover.bottom .popover-title,
|
||||
.popover.bottom .popover-content
|
||||
direction: rtl
|
||||
text-align: right
|
||||
|
||||
@@ -22,10 +22,12 @@
|
||||
<div class="col-xs-12 col-sm-6 col-md-4 element-panel">
|
||||
<div class="panel">
|
||||
<div class="module-info-wrapper">
|
||||
<div class="module-logo clearfix">
|
||||
<img src="{if isset($element->image)}{$element->image}{else}{$modules_uri}/{$element->name}/{$element->logo}{/if}" title="{$element->displayName}" class="pull-left">
|
||||
<h4 class="name" data-name="{$element->name}">{$element->displayName}</h4>
|
||||
<p class="text-muted">{$element->version} {l s='By'} {$element->author}</p>
|
||||
<div class="module-logo">
|
||||
<img src="{if isset($element->image)}{$element->image}{else}{$modules_uri}/{$element->name}/{$element->logo}{/if}" title="{$element->displayName}">
|
||||
<div>
|
||||
<h4 class="name" data-name="{$element->name}">{$element->displayName}</h4>
|
||||
<p class="text-muted">{$element->version} {l s='By'} {$element->author}</p>
|
||||
</div>
|
||||
</div>
|
||||
<p>
|
||||
{if $element->description_full}
|
||||
|
||||
@@ -48,28 +48,18 @@
|
||||
}
|
||||
|
||||
{if isset($use_checkbox) && $use_checkbox == true}
|
||||
function checkAllAssociatedCategories($tree)
|
||||
function checkAllAssociatedHotels($tree)
|
||||
{
|
||||
$tree.find(':input[type=checkbox]').each(function(){
|
||||
$(this).prop('checked', true);
|
||||
|
||||
addDefaultCategory($(this));
|
||||
$(this).parent().addClass('tree-selected');
|
||||
});
|
||||
}
|
||||
|
||||
function uncheckAllAssociatedCategories($tree)
|
||||
function uncheckAllAssociatedHotels($tree)
|
||||
{
|
||||
$tree.find(':input[type=checkbox]').each(function(){
|
||||
$(this).prop('checked', false);
|
||||
|
||||
$('select#id_category_default option[value='+$(this).val()+']').remove();
|
||||
if ($('select#id_category_default option').length == 0)
|
||||
{
|
||||
$('select#id_category_default').closest('.form-group').hide();
|
||||
$('#no_default_category').show();
|
||||
}
|
||||
|
||||
$(this).parent().removeClass('tree-selected');
|
||||
});
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ $(document).ready(function () {
|
||||
<input maxlength="27" id="ecotax" name="ecotax" type="text" value="{$product->ecotax|string_format:$priceDisplayPrecisionFormat}" onkeyup="$('#priceType').val('TI');if (isArrowKey(event))return; calcPriceTE(); this.value = this.value.replace(/,/g, '.'); if (parseInt(this.value) > getE('priceTE').value) this.value = getE('priceTE').value; if (isNaN(this.value)) this.value = 0;" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group {if $product->auto_add_to_cart && $product->price_addition_type == Product::PRICE_ADDITION_TYPE_WITH_ROOM}hide_on_auto_add_Withroom{/if}" {if !$country_display_tax_label || $tax_exclude_taxe_option}style="display:none;"{/if} {if $product->auto_add_to_cart && $product->price_addition_type == Product::PRICE_ADDITION_TYPE_WITH_ROOM}style="display:none"{/if}>
|
||||
{* <div class="form-group {if $product->auto_add_to_cart && $product->price_addition_type == Product::PRICE_ADDITION_TYPE_WITH_ROOM}hide_on_auto_add_Withroom{/if}" {if !$country_display_tax_label || $tax_exclude_taxe_option}style="display:none;"{/if} {if $product->auto_add_to_cart && $product->price_addition_type == Product::PRICE_ADDITION_TYPE_WITH_ROOM}style="display:none"{/if}>
|
||||
<label class="control-label col-lg-3" for="priceTI">{l s='Retail price with tax'}</label>
|
||||
<div class="input-group col-lg-2">
|
||||
<span class="input-group-addon">{$currency->prefix}{$currency->suffix}</span>
|
||||
@@ -208,7 +208,7 @@ $(document).ready(function () {
|
||||
<input id="priceTI" name="priceTI" type="text" value="" onchange="noComma('priceTI');" maxlength="27" onkeyup="$('#priceType').val('TI');if (isArrowKey(event)) return; calcPriceTE();" />
|
||||
</div>
|
||||
{if isset($pack) && $pack->isPack($product->id)}<p class="col-lg-9 col-lg-offset-3 help-block">{l s='The sum of prices of the products in the pack is %s%s%s' sprintf=[$currency->prefix,{toolsConvertPrice price=$pack->noPackPrice($product->id)|string_format:$priceDisplayPrecisionFormat},$currency->suffix]}</p>{/if}
|
||||
</div>
|
||||
</div> *}
|
||||
<div class="form-group">
|
||||
<label class="control-label col-lg-3" for="price_calculation_method">
|
||||
<span class="label-tooltip" data-toggle="tooltip" title="{l s='Select whether price for this service will be added for each day of the booking or price will be added to the entire date range of the booking'}">
|
||||
|
||||
@@ -1171,7 +1171,7 @@
|
||||
currency_format = jsonSummary.currency.format;
|
||||
currency_sign = jsonSummary.currency.sign;
|
||||
currency_blank = jsonSummary.currency.blank;
|
||||
priceDisplayPrecision = jsonSummary.currency.decimals ? 2 : 0;
|
||||
priceDisplayPrecision = parseInt(jsonSummary.currency.decimals) ? {$smarty.const._PS_PRICE_DISPLAY_PRECISION_|intval} : 0;
|
||||
|
||||
updateCartProducts(jsonSummary.summary.products, jsonSummary.summary.gift_products, jsonSummary.cart.id_address_delivery);
|
||||
updateCartVouchers(jsonSummary.summary.discounts);
|
||||
|
||||
@@ -25,39 +25,41 @@
|
||||
|
||||
<{if isset($href) && $href}a style="display:block" href="{$href|escape:'html':'UTF-8'}"{else}div{/if} id="{$id|escape:'html':'UTF-8'}" data-toggle="tooltip" class="box-stats label-tooltip {$color|escape}" data-original-title="{$tooltip|escape}" {if $target}target="_blank"{/if}>
|
||||
<div class="kpi-content">
|
||||
<div class="title-subtitle">
|
||||
<div class="title-container">
|
||||
<span class="title">
|
||||
{if isset($icon) && $icon}<i class="{$icon|escape}"></i>{/if}
|
||||
{$title|escape}
|
||||
</span>
|
||||
</div>
|
||||
{if $subtitle}
|
||||
<div class="subtitle-container">
|
||||
<span class="subtitle">
|
||||
{$subtitle|escape}
|
||||
{if isset($icon) && $icon}<i class="{$icon|escape} kpi-icon"></i>{/if}
|
||||
<div class="kpi-data">
|
||||
<div class="title-subtitle">
|
||||
<div class="title-container">
|
||||
<span class="title">
|
||||
{$title|escape}
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{if isset($chart) && $chart}
|
||||
<div class="boxchart-overlay">
|
||||
<div class="boxchart">
|
||||
</div>
|
||||
{if $subtitle}
|
||||
<div class="subtitle-container">
|
||||
<span class="subtitle">
|
||||
{$subtitle|escape}
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
<div class="value-container">
|
||||
{if isset($source) && $source}
|
||||
<span class="value skeleton-loading-wave loading-container-bar loading"></span>
|
||||
{elseif isset($value) && $value !== ''}
|
||||
<span class="value">{$value|escape:'html':'UTF-8'}</span>
|
||||
{if isset($chart) && $chart}
|
||||
<div class="boxchart-overlay">
|
||||
<div class="boxchart">
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="value-container">
|
||||
{if isset($source) && $source}
|
||||
<span class="value skeleton-loading-wave loading-container-bar loading"></span>
|
||||
{elseif isset($value) && $value !== ''}
|
||||
<span class="value">{$value|escape:'html':'UTF-8'}</span>
|
||||
{/if}
|
||||
</div>
|
||||
{if isset($href) && $href}
|
||||
<span class="arrow pull-right"><i class="icon-angle-right"></i></span>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{if isset($href) && $href}
|
||||
<span class="arrow"><i class="icon-angle-right"></i></span>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</{if isset($href) && $href}a{else}div{/if}>
|
||||
|
||||
{if isset($source) && $source}
|
||||
|
||||
@@ -295,28 +295,30 @@
|
||||
<label class="col-xs-3" for="filter_input_{$key}">{$params['title']|escape:'html':'UTF-8'}</label>
|
||||
<div class="col-xs-9">
|
||||
{if $params.type == 'range'}
|
||||
{$field_name="`$list_id`Filter_{if isset($params.filter_key)}`$params.filter_key`{else}`$key`{/if}"}
|
||||
<div class="input_range">
|
||||
<input type="text" class="filter form-control" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}[0]" placeholder="{l s='From'}" value="{if isset($params.value.0)}{$params.value.0}{/if}">
|
||||
<input type="text" class="filter form-control" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}[1]" placeholder="{l s='To'}" value="{if isset($params.value.1)}{$params.value.1}{/if}">
|
||||
<input type="text" class="filter form-control" name="{$field_name}[0]" placeholder="{l s='From'}" value="{if isset($smarty.post[$field_name][0]) && $smarty.post[$field_name][0]}{$smarty.post[$field_name][0]}{elseif isset($params.value.0)}{$params.value.0}{/if}">
|
||||
<input type="text" class="filter form-control" name="{$field_name}[1]" placeholder="{l s='To'}" value="{if isset($smarty.post[$field_name][1]) && $smarty.post[$field_name][1]}{$smarty.post[$field_name][1]}{elseif isset($params.value.1)}{$params.value.1}{/if}">
|
||||
</div>
|
||||
{elseif $params.type == 'bool'}
|
||||
<select id="filter_input_{$key}" class="filter center" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}">
|
||||
{$field_name="`$list_id`Filter_{if isset($params.filter_key)}`$params.filter_key`{else}`$key`{/if}"}
|
||||
<select id="filter_input_{$key}" class="filter center" name="{$field_name}">
|
||||
<option value="">-</option>
|
||||
<option value="1" {if $params.value == 1} selected="selected" {/if}>{l s='Yes'}</option>
|
||||
<option value="0" {if $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option>
|
||||
<option value="1" {if isset($smarty.post.$field_name) && $smarty.post.$field_name == 1} selected="selected"{elseif $params.value == 1} selected="selected" {/if}>{l s='Yes'}</option>
|
||||
<option value="0" {if isset($smarty.post.$field_name) && $smarty.post.$field_name == 0} selected="selected"{elseif $params.value == 0 && $params.value != ''} selected="selected" {/if}>{l s='No'}</option>
|
||||
</select>
|
||||
{elseif $params.type == 'date' || $params.type == 'datetime'}
|
||||
<div class="date_range">
|
||||
<div class="input-group center">
|
||||
<input type="text" class="filter datepicker date-input form-control" id="local_{$params.id_date}_0" name="local_{$params.name_date}[0]" placeholder="{l s='From'}" autocomplete="off"/>
|
||||
<input type="hidden" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($params.value.0)}{$params.value.0}{/if}">
|
||||
<input type="hidden" id="{$params.id_date}_0" name="{$params.name_date}[0]" value="{if isset($smarty.post[$params.name_date][0]) && $smarty.post[$params.name_date][0]}{$smarty.post[$params.name_date][0]}{elseif isset($params.value.0)}{$params.value.0}{/if}">
|
||||
<span class="input-group-addon">
|
||||
<i class="icon-calendar"></i>
|
||||
</span>
|
||||
</div>
|
||||
<div class="input-group center">
|
||||
<input type="text" class="filter datepicker date-input form-control" id="local_{$params.id_date}_1" name="local_{$params.name_date}[1]" placeholder="{l s='To'}" autocomplete="off"/>
|
||||
<input type="hidden" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($params.value.1)}{$params.value.1}{/if}">
|
||||
<input type="hidden" id="{$params.id_date}_1" name="{$params.name_date}[1]" value="{if isset($smarty.post[$params.name_date][1]) && $smarty.post[$params.name_date][1]}{$smarty.post[$params.name_date][1]}{elseif isset($params.value.1)}{$params.value.1}{/if}">
|
||||
<span class="input-group-addon">
|
||||
<i class="icon-calendar"></i>
|
||||
</span>
|
||||
@@ -370,28 +372,30 @@
|
||||
</script>
|
||||
</div>
|
||||
{elseif $params.type == 'select'}
|
||||
{$field_name="`$list_id`Filter_`$params.filter_key`"}
|
||||
{if isset($params.multiple) && $params.multiple}
|
||||
<select id="filter_input_{$key}" class="filter{if isset($params.align) && $params.align == 'center'}center{/if} select_multiple_{$params.operator} chosen" multiple name="{$list_id}Filter_{$params.filter_key}[]" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
<select id="filter_input_{$key}" class="filter{if isset($params.align) && $params.align == 'center'}center{/if} select_multiple_{$params.operator} chosen" multiple name="{$field_name}[]" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
{if isset($params.list) && is_array($params.list)}
|
||||
{foreach $params.list AS $option_value => $option_display}
|
||||
<option value="{$option_value}" {if isset($params.value) && $params.value}{if in_array($option_value, $params.value)} selected="selected"{/if}{/if}>{$option_display}</option>
|
||||
<option value="{$option_value}" {if isset($smarty.post.$field_name) && $smarty.post.$field_name && in_array($option_value, $smarty.post.$field_name)} selected="selected"{elseif isset($params.value) && $params.value}{if in_array($option_value, $params.value)} selected="selected"{/if}{/if}>{$option_display}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
{else}
|
||||
{if isset($params.filter_key)}
|
||||
<select id="filter_input_{$key}" class="filter{if isset($params.align) && $params.align == 'center'}center{/if} {if isset($params.class)}{$params.class}{/if}" name="{$list_id}Filter_{$params.filter_key}" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
<select id="filter_input_{$key}" class="filter{if isset($params.align) && $params.align == 'center'}center{/if} {if isset($params.class)}{$params.class}{/if}" name="{$field_name}" {if isset($params.width)} style="width:{$params.width}px"{/if}>
|
||||
<option value="" {if $params.value == ''} selected="selected" {/if}>-</option>
|
||||
{if isset($params.list) && is_array($params.list)}
|
||||
{foreach $params.list AS $option_value => $option_display}
|
||||
<option value="{$option_value}" {if (string)$option_display === (string)$params.value || (string)$option_value === (string)$params.value} selected="selected"{/if}>{$option_display}</option>
|
||||
<option value="{$option_value}" {if isset($smarty.post.$field_name) && $smarty.post.$field_name == $option_value} selected="selected"{elseif (string)$option_display === (string)$params.value || (string)$option_value === (string)$params.value} selected="selected"{/if}>{$option_display}</option>
|
||||
{/foreach}
|
||||
{/if}
|
||||
</select>
|
||||
{/if}
|
||||
{/if}
|
||||
{else}
|
||||
<input type="text" id="filter_input_{$key}" class="filter" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" value="{$params.value|escape:'html':'UTF-8'}" {if isset($params.width) && $params.width != 'auto'} style="width:{$params.width}px"{/if} />
|
||||
{$field_name="`$list_id`Filter_{if isset($params.filter_key)}`$params.filter_key`{else}`$key`{/if}"}
|
||||
<input type="text" id="filter_input_{$key}" class="filter" name="{$field_name}" value="{if isset($smarty.post.$field_name) && $smarty.post.$field_name}{$smarty.post.$field_name}{else}{$params.value|escape:'html':'UTF-8'}{/if}" {if isset($params.width) && $params.width != 'auto'} style="width:{$params.width}px"{/if} />
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -2380,7 +2380,6 @@ class CartCore extends ObjectModel
|
||||
$array = array();
|
||||
foreach($selectedServiceProducts as $selectedProduct) {
|
||||
if (isset($array[$selectedProduct['id_hotel']])) {
|
||||
$array[$selectedProduct['id_hotel']]['quantity'] += $selectedProduct['quantity'];
|
||||
$array[$selectedProduct['id_hotel']]['total_price_tax_excl'] += $selectedProduct['total_price_tax_excl'];
|
||||
$array[$selectedProduct['id_hotel']]['total_price_tax_incl'] += $selectedProduct['total_price_tax_incl'];
|
||||
} else {
|
||||
|
||||
@@ -89,8 +89,9 @@ class CookieCore
|
||||
$this->_path = '/'.$this->_path;
|
||||
}
|
||||
$this->_path = rawurlencode($this->_path);
|
||||
$this->_path = str_replace('%2F', '/', $this->_path);
|
||||
$this->_path = str_replace('%7E', '~', $this->_path);
|
||||
$search = array('%2F', '%7E', '%28', '%29', '%2B', '%26');
|
||||
$replace = array('/', '~', '(', ')', '+', '&');
|
||||
$this->_path = str_replace($search, $replace, $this->_path);
|
||||
$this->_domain = $this->getDomain($shared_urls);
|
||||
$this->_sameSite = Configuration::get('PS_COOKIE_SAMESITE');
|
||||
$this->_name = 'QloApps-'.md5(($this->_standalone ? '' : _PS_VERSION_).$name.$this->_domain);
|
||||
|
||||
@@ -140,14 +140,15 @@ class CustomerThreadCore extends ObjectModel
|
||||
return Db::getInstance()->executeS($sql);
|
||||
}
|
||||
|
||||
public static function getIdCustomerThreadByEmailAndIdOrder($email, $id_order)
|
||||
public static function getIdCustomerThreadByEmailAndIdOrder($email, $id_order, $id_contact = false)
|
||||
{
|
||||
return Db::getInstance()->getValue('
|
||||
SELECT cm.id_customer_thread
|
||||
FROM '._DB_PREFIX_.'customer_thread cm
|
||||
WHERE cm.email = \''.pSQL($email).'\'
|
||||
AND cm.id_shop = '.(int)Context::getContext()->shop->id.'
|
||||
AND cm.id_order = '.(int)$id_order
|
||||
AND cm.id_order = '.(int)$id_order.' '.
|
||||
(($id_contact) ? ' AND cm.id_contact='.(int) $id_contact : ' ')
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -841,13 +841,13 @@ class AdminControllerCore extends Controller
|
||||
$this->ensureListIdDefinition();
|
||||
|
||||
$prefix = $this->getCookieFilterPrefix();
|
||||
|
||||
$filters = array();
|
||||
if (isset($this->list_id)) {
|
||||
foreach ($_POST as $key => $value) {
|
||||
if ($value === '') {
|
||||
unset($this->context->cookie->{$prefix.$key});
|
||||
} elseif (stripos($key, $this->list_id.'Filter_') === 0) {
|
||||
$this->context->cookie->{$prefix.$key} = !is_array($value) ? $value : json_encode($value);
|
||||
$filters[$prefix.$key] = !is_array($value) ? $value : json_encode($value);
|
||||
} elseif (stripos($key, 'submitFilter') === 0) {
|
||||
$this->context->cookie->$key = !is_array($value) ? $value : json_encode($value);
|
||||
}
|
||||
@@ -855,7 +855,7 @@ class AdminControllerCore extends Controller
|
||||
|
||||
foreach ($_GET as $key => $value) {
|
||||
if (stripos($key, $this->list_id.'Filter_') === 0) {
|
||||
$this->context->cookie->{$prefix.$key} = !is_array($value) ? $value : json_encode($value);
|
||||
$filters[$prefix.$key] = !is_array($value) ? $value : json_encode($value);
|
||||
} elseif (stripos($key, 'submitFilter') === 0) {
|
||||
$this->context->cookie->$key = !is_array($value) ? $value : json_encode($value);
|
||||
}
|
||||
@@ -863,65 +863,36 @@ class AdminControllerCore extends Controller
|
||||
if ($value === '' || $value == $this->_defaultOrderBy) {
|
||||
unset($this->context->cookie->{$prefix.$key});
|
||||
} else {
|
||||
$this->context->cookie->{$prefix.$key} = $value;
|
||||
$filters[$prefix.$key] = $value;
|
||||
}
|
||||
} elseif (stripos($key, $this->list_id.'Orderway') === 0 && Validate::isOrderWay($value)) {
|
||||
if ($value === '' || $value == $this->_defaultOrderWay) {
|
||||
unset($this->context->cookie->{$prefix.$key});
|
||||
} else {
|
||||
$this->context->cookie->{$prefix.$key} = $value;
|
||||
$filters[$prefix.$key] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$filters = $this->context->cookie->getFamily($prefix.$this->list_id.'Filter_');
|
||||
$definition = false;
|
||||
if (isset($this->className) && $this->className) {
|
||||
$definition = ObjectModel::getDefinition($this->className);
|
||||
if (empty($filters)) {
|
||||
$filters = $this->context->cookie->getFamily($prefix.$this->list_id.'Filter_');
|
||||
}
|
||||
|
||||
foreach ($filters as $key => $value) {
|
||||
/* Extracting filters from $_POST on key filter_ */
|
||||
if ($value != null && !strncmp($key, $prefix.$this->list_id.'Filter_', 7 + Tools::strlen($prefix.$this->list_id))) {
|
||||
$key_org = $key;
|
||||
$key = Tools::substr($key, 7 + Tools::strlen($prefix.$this->list_id));
|
||||
/* Table alias could be specified using a ! eg. alias!field */
|
||||
$tmp_tab = explode('!', $key);
|
||||
$filter = count($tmp_tab) > 1 ? $tmp_tab[1] : $tmp_tab[0];
|
||||
|
||||
if ($field = $this->filterToField($key, $filter)) {
|
||||
$type = (array_key_exists('filter_type', $field) ? $field['filter_type'] : (array_key_exists('type', $field) ? $field['type'] : false));
|
||||
if ((($type == 'date' || $type == 'datetime' || $type == 'range') || ($type == 'select' && (isset($field['multiple']) && $field['multiple'])))
|
||||
&& is_string($value)
|
||||
) {
|
||||
$value = json_decode($value, true);
|
||||
$key_org = $key;
|
||||
$key = Tools::substr($key, 7 + Tools::strlen($prefix.$this->list_id));
|
||||
/* Table alias could be specified using a ! eg. alias!field */
|
||||
$tmp_tab = explode('!', $key);
|
||||
$filter = count($tmp_tab) > 1 ? $tmp_tab[1] : $tmp_tab[0];
|
||||
if ($field = $this->filterToField($key, $filter)) {
|
||||
$type = (array_key_exists('filter_type', $field) ? $field['filter_type'] : (array_key_exists('type', $field) ? $field['type'] : false));
|
||||
if (($type == 'date' || $type == 'datetime' || $type == 'range')) {
|
||||
if (is_string($value)) {
|
||||
$filter_value = json_decode($value, true);
|
||||
}
|
||||
$key = isset($tmp_tab[1]) ? $tmp_tab[0].'.`'.$tmp_tab[1].'`' : '`'.$tmp_tab[0].'`';
|
||||
|
||||
// as in database 0 means position 1 in the renderlist
|
||||
if (isset($field['position']) && Validate::isInt($value)) {
|
||||
$value -= 1;
|
||||
}
|
||||
|
||||
// Assignment by reference
|
||||
if (array_key_exists('tmpTableFilter', $field)) {
|
||||
$sql_filter = & $this->_tmpTableFilter;
|
||||
} elseif (array_key_exists('havingFilter', $field)) {
|
||||
$sql_filter = & $this->_filterHaving;
|
||||
} else {
|
||||
$sql_filter = & $this->_filter;
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
if ($type == 'select' && (isset($field['multiple']) && $field['multiple']) && isset($field['operator'])) {
|
||||
if ($field['operator'] == 'and') {
|
||||
$sql_filter .= ' AND '.pSQL($key).' IN ('.pSQL(implode(',', $value)).')';
|
||||
$this->_filterHaving .= ' AND COUNT(DISTINCT '.pSQL($key).') = '.(int) count($value);
|
||||
} elseif ($field['operator'] == 'or') {
|
||||
$sql_filter .= ' AND '.pSQL($key).' IN ('.pSQL(implode(',', $value)).')';
|
||||
}
|
||||
} elseif ($type == 'range') {
|
||||
if (is_array($filter_value)) {
|
||||
if ($type == 'range') {
|
||||
// set validation type
|
||||
if (isset($field['validation']) && $field['validation'] && method_exists('Validate', $field['validation'])) {
|
||||
$validation = $field['validation'];
|
||||
@@ -929,57 +900,120 @@ class AdminControllerCore extends Controller
|
||||
$validation = 'isUnsignedInt';
|
||||
}
|
||||
|
||||
if (isset($value[0]) && ($value[0] !== '' || $value[0] === 0)) {
|
||||
if (!Validate::$validation($value[0])) {
|
||||
$this->errors[] = Tools::displayError('The \'From\' value is invalid');
|
||||
} else {
|
||||
$sql_filter .= ' AND '.pSQL($key).' >= '.pSQL($value[0]);
|
||||
if (isset($filter_value[0]) && ($filter_value[0] !== '' || $filter_value[0] === 0)) {
|
||||
if (!Validate::$validation($filter_value[0])) {
|
||||
$this->errors[] = sprintf(Tools::displayError('The %s field \'From\' value is invalid'), $field['title']);
|
||||
}
|
||||
}
|
||||
if (isset($value[1]) && ($value[1] !== '' || $value[1] === 0)) {
|
||||
if (!Validate::$validation($value[1])) {
|
||||
$this->errors[] = Tools::displayError('The \'To\' value is invalid');
|
||||
} elseif ((isset($value[0]) && ($value[0] !== '' || $value[0] === 0)) && $value[0] > $value[1]) {
|
||||
$this->errors[] = Tools::displayError('The \'To\' value cannot be less than \'From\' value');
|
||||
} else {
|
||||
$sql_filter .= ' AND '.pSQL($key).' <= '.pSQL($value[1]);
|
||||
if (isset($filter_value[1]) && ($filter_value[1] !== '' || $filter_value[1] === 0)) {
|
||||
if (!Validate::$validation($filter_value[1])) {
|
||||
$this->errors[] = sprintf(Tools::displayError('The %s field \'To\' value is invalid'), $field['title']);
|
||||
} elseif ((isset($filter_value[0]) && ($filter_value[0] !== '' || $filter_value[0] === 0)) && $filter_value[0] > $filter_value[1]) {
|
||||
$this->errors[] = sprintf(Tools::displayError('The %s field \'To\' value cannot be less than \'From\' value'), $field['title']);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (isset($value[0]) && !empty($value[0])) {
|
||||
if (!Validate::isDate($value[0])) {
|
||||
$this->errors[] = Tools::displayError('The \'From\' date format is invalid (YYYY-MM-DD)');
|
||||
} else {
|
||||
$sql_filter .= ' AND '.pSQL($key).' >= \''.pSQL(Tools::dateFrom($value[0])).'\'';
|
||||
if (isset($filter_value[0]) && !empty($filter_value[0])) {
|
||||
if (!Validate::isDate($filter_value[0])) {
|
||||
$this->errors[] = sprintf(Tools::displayError('The %s field \'From\' date format is invalid (YYYY-MM-DD)'), $field['title']);
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($value[1]) && !empty($value[1])) {
|
||||
if (!Validate::isDate($value[1])) {
|
||||
$this->errors[] = Tools::displayError('The \'To\' date format is invalid (YYYY-MM-DD)');
|
||||
} elseif (isset($value[0]) && !empty($value[0]) && strtotime($value[0]) > strtotime($value[1])) {
|
||||
$this->errors[] = Tools::displayError('The \'To\' date cannot be earlier than \'From\' date');
|
||||
} else {
|
||||
$sql_filter .= ' AND '.pSQL($key).' <= \''.pSQL(Tools::dateTo($value[1])).'\'';
|
||||
if (isset($filter_value[1]) && !empty($filter_value[1])) {
|
||||
if (!Validate::isDate($filter_value[1])) {
|
||||
$this->errors[] = sprintf(Tools::displayError('The %s field \'To\' date format is invalid (YYYY-MM-DD)'), $field['title']);
|
||||
} elseif (isset($filter_value[0]) && !empty($filter_value[0]) && strtotime($filter_value[0]) > strtotime($filter_value[1])) {
|
||||
$this->errors[] = sprintf(Tools::displayError('The %s field \'To\' date cannot be earlier than \'From\' date'), $field['title']);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$sql_filter .= ' AND ';
|
||||
$check_key = ($key == $this->identifier || $key == '`'.$this->identifier.'`');
|
||||
$alias = ($definition && !empty($definition['fields'][$filter]['shop'])) ? 'sa' : 'a';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($type == 'int' || $type == 'bool') {
|
||||
$sql_filter .= (($check_key || $key == '`active`') ? $alias.'.' : '').pSQL($key).' = '.(int)$value.' ';
|
||||
} elseif ($type == 'decimal') {
|
||||
$sql_filter .= ($check_key ? $alias.'.' : '').pSQL($key).' = '.(float)$value.' ';
|
||||
} elseif ($type == 'select') {
|
||||
$sql_filter .= ($check_key ? $alias.'.' : '').pSQL($key).' = \''.pSQL($value).'\' ';
|
||||
} elseif ($type == 'price') {
|
||||
$value = (float)str_replace(',', '.', $value);
|
||||
$sql_filter .= ($check_key ? $alias.'.' : '').pSQL($key).' = '.pSQL(trim($value)).' ';
|
||||
} else {
|
||||
$sql_filter .= ($check_key ? $alias.'.' : '').pSQL($key).' LIKE \'%'.pSQL(trim($value)).'%\' ';
|
||||
if (empty($this->errors)) {
|
||||
$definition = false;
|
||||
if (isset($this->className) && $this->className) {
|
||||
$definition = ObjectModel::getDefinition($this->className);
|
||||
}
|
||||
if ($filters) {
|
||||
foreach ($filters as $key => $value) {
|
||||
$this->context->cookie->$key = $value;
|
||||
|
||||
/* Extracting filters from $_POST on key filter_ */
|
||||
if ($value != null && !strncmp($key, $prefix.$this->list_id.'Filter_', 7 + Tools::strlen($prefix.$this->list_id))) {
|
||||
$key_org = $key;
|
||||
$key = Tools::substr($key, 7 + Tools::strlen($prefix.$this->list_id));
|
||||
/* Table alias could be specified using a ! eg. alias!field */
|
||||
$tmp_tab = explode('!', $key);
|
||||
$filter = count($tmp_tab) > 1 ? $tmp_tab[1] : $tmp_tab[0];
|
||||
|
||||
if ($field = $this->filterToField($key, $filter)) {
|
||||
$type = (array_key_exists('filter_type', $field) ? $field['filter_type'] : (array_key_exists('type', $field) ? $field['type'] : false));
|
||||
if ((($type == 'date' || $type == 'datetime' || $type == 'range') || ($type == 'select' && (isset($field['multiple']) && $field['multiple'])))
|
||||
&& is_string($value)
|
||||
) {
|
||||
$value = json_decode($value, true);
|
||||
}
|
||||
$key = isset($tmp_tab[1]) ? $tmp_tab[0].'.`'.$tmp_tab[1].'`' : '`'.$tmp_tab[0].'`';
|
||||
|
||||
// as in database 0 means position 1 in the renderlist
|
||||
if (isset($field['position']) && Validate::isInt($value)) {
|
||||
$value -= 1;
|
||||
}
|
||||
|
||||
// Assignment by reference
|
||||
if (array_key_exists('tmpTableFilter', $field)) {
|
||||
$sql_filter = & $this->_tmpTableFilter;
|
||||
} elseif (array_key_exists('havingFilter', $field)) {
|
||||
$sql_filter = & $this->_filterHaving;
|
||||
} else {
|
||||
$sql_filter = & $this->_filter;
|
||||
}
|
||||
|
||||
if (is_array($value)) {
|
||||
if ($type == 'select' && (isset($field['multiple']) && $field['multiple']) && isset($field['operator'])) {
|
||||
if ($field['operator'] == 'and') {
|
||||
$sql_filter .= ' AND '.pSQL($key).' IN ('.pSQL(implode(',', $value)).')';
|
||||
$this->_filterHaving .= ' AND COUNT(DISTINCT '.pSQL($key).') = '.(int) count($value);
|
||||
} elseif ($field['operator'] == 'or') {
|
||||
$sql_filter .= ' AND '.pSQL($key).' IN ('.pSQL(implode(',', $value)).')';
|
||||
}
|
||||
} elseif ($type == 'range') {
|
||||
|
||||
if (isset($value[0]) && ($value[0] !== '' || $value[0] === 0)) {
|
||||
$sql_filter .= ' AND '.pSQL($key).' >= '.pSQL($value[0]);
|
||||
}
|
||||
if (isset($value[1]) && ($value[1] !== '' || $value[1] === 0)) {
|
||||
$sql_filter .= ' AND '.pSQL($key).' <= '.pSQL($value[1]);
|
||||
}
|
||||
} else {
|
||||
if (isset($value[0]) && !empty($value[0])) {
|
||||
$sql_filter .= ' AND '.pSQL($key).' >= \''.pSQL(Tools::dateFrom($value[0])).'\'';
|
||||
}
|
||||
if (isset($value[1]) && !empty($value[1])) {
|
||||
$sql_filter .= ' AND '.pSQL($key).' <= \''.pSQL(Tools::dateTo($value[1])).'\'';
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$sql_filter .= ' AND ';
|
||||
$check_key = ($key == $this->identifier || $key == '`'.$this->identifier.'`');
|
||||
$alias = ($definition && !empty($definition['fields'][$filter]['shop'])) ? 'sa' : 'a';
|
||||
|
||||
if ($type == 'int' || $type == 'bool') {
|
||||
$sql_filter .= (($check_key || $key == '`active`') ? $alias.'.' : '').pSQL($key).' = '.(int)$value.' ';
|
||||
} elseif ($type == 'decimal') {
|
||||
$sql_filter .= ($check_key ? $alias.'.' : '').pSQL($key).' = '.(float)$value.' ';
|
||||
} elseif ($type == 'select') {
|
||||
$sql_filter .= ($check_key ? $alias.'.' : '').pSQL($key).' = \''.pSQL($value).'\' ';
|
||||
} elseif ($type == 'price') {
|
||||
$value = (float)str_replace(',', '.', $value);
|
||||
$sql_filter .= ($check_key ? $alias.'.' : '').pSQL($key).' = '.pSQL(trim($value)).' ';
|
||||
} else {
|
||||
$sql_filter .= ($check_key ? $alias.'.' : '').pSQL($key).' LIKE \'%'.pSQL(trim($value)).'%\' ';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1042,7 +1076,7 @@ class AdminControllerCore extends Controller
|
||||
if ($this->filter && $this->action != 'reset_filters') {
|
||||
$this->processFilter();
|
||||
}
|
||||
if (isset($_POST) && count($_POST) && (int)Tools::getValue('submitFilter'.$this->list_id) || Tools::isSubmit('submitReset'.$this->list_id)) {
|
||||
if (empty($this->errors) && isset($_POST) && count($_POST) && (int)Tools::getValue('submitFilter'.$this->list_id) || Tools::isSubmit('submitReset'.$this->list_id)) {
|
||||
$this->setRedirectAfter(self::$currentIndex.'&token='.$this->token.(Tools::isSubmit('submitFilter'.$this->list_id) ? '&submitFilter'.$this->list_id.'='.(int)Tools::getValue('submitFilter'.$this->list_id) : '').(isset($_GET['id_'.$this->list_id]) ? '&id_'.$this->list_id.'='.(int)$_GET['id_'.$this->list_id] : ''));
|
||||
}
|
||||
|
||||
|
||||
@@ -382,6 +382,23 @@ class HelperTreeHotelsCore extends TreeCore
|
||||
$this->addAction($expand_all);
|
||||
|
||||
if ($this->useCheckBox()) {
|
||||
if ($this->useBulkActions()) {
|
||||
$check_all = new TreeToolbarLink(
|
||||
'Check All',
|
||||
'#',
|
||||
'checkAllAssociatedHotels($(\'#'.$this->getId().'\'));return false;',
|
||||
'icon-check-sign');
|
||||
$check_all->setAttribute('id', 'check-all-'.$this->getId());
|
||||
$uncheck_all = new TreeToolbarLink(
|
||||
'Uncheck All',
|
||||
'#',
|
||||
'uncheckAllAssociatedHotels($(\'#'.$this->getId().'\'));return false;',
|
||||
'icon-check-empty');
|
||||
$uncheck_all->setAttribute('id', 'uncheck-all-'.$this->getId());
|
||||
$this->addAction($check_all);
|
||||
$this->addAction($uncheck_all);
|
||||
}
|
||||
|
||||
$this->setNodeFolderTemplate('tree_node_hotel_folder_checkbox.tpl');
|
||||
$this->setNodeItemTemplate('tree_node_hotel_item_checkbox.tpl');
|
||||
$this->setAttribute('use_checkbox', $this->useCheckBox());
|
||||
|
||||
@@ -77,6 +77,7 @@ abstract class ModuleGraphCore extends Module
|
||||
if (is_callable(array($this, 'setDayValues'))) {
|
||||
$this->setDayValues($layers);
|
||||
}
|
||||
$this->_titles['x'][] = $this->l('Time');
|
||||
}
|
||||
// If the granularity is inferior to 1 month
|
||||
// @TODO : change to manage 28 to 31 days
|
||||
@@ -110,6 +111,7 @@ abstract class ModuleGraphCore extends Module
|
||||
if (is_callable(array($this, 'setMonthValues'))) {
|
||||
$this->setMonthValues($layers);
|
||||
}
|
||||
$this->_titles['x'][] = $this->l('Date');
|
||||
}
|
||||
// If the granularity is less than 1 year
|
||||
elseif (strtotime('-1 year', strtotime($this->_employee->stats_date_to)) < strtotime($this->_employee->stats_date_from)) {
|
||||
@@ -141,6 +143,7 @@ abstract class ModuleGraphCore extends Module
|
||||
if (is_callable(array($this, 'setYearValues'))) {
|
||||
$this->setYearValues($layers);
|
||||
}
|
||||
$this->_titles['x'][] = $this->l('Month');
|
||||
}
|
||||
// If the granularity is greater than 1 year
|
||||
else {
|
||||
@@ -163,6 +166,7 @@ abstract class ModuleGraphCore extends Module
|
||||
if (is_callable(array($this, 'setAllTimeValues'))) {
|
||||
$this->setAllTimeValues($layers);
|
||||
}
|
||||
$this->_titles['x'][] = $this->l('Year');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -210,7 +214,7 @@ abstract class ModuleGraphCore extends Module
|
||||
if (isset($this->_values[$key])) {
|
||||
// We don't want strings to be divided. Example: product name
|
||||
if (is_numeric($this->_values[$key])) {
|
||||
$this->_csv .= $this->_values[$key] / (($datas['type'] == 'pie') ? $total : 1);
|
||||
$this->_csv .= $this->_values[$key] * 100 / (($datas['type'] == 'pie') ? $total : 1) . '%';
|
||||
} else {
|
||||
$this->_csv .= $this->_values[$key];
|
||||
}
|
||||
@@ -220,7 +224,7 @@ abstract class ModuleGraphCore extends Module
|
||||
} else {
|
||||
// We don't want strings to be divided. Example: product name
|
||||
if (is_numeric($this->_values[$i][$key])) {
|
||||
$this->_csv .= $this->_values[$i][$key] / (($datas['type'] == 'pie') ? $total : 1);
|
||||
$this->_csv .= $this->_values[$i][$key] * 100 / (($datas['type'] == 'pie') ? $total : 1) . '%';
|
||||
} else {
|
||||
$this->_csv .= $this->_values[$i][$key];
|
||||
}
|
||||
|
||||
@@ -153,7 +153,10 @@ abstract class ModuleGridCore extends Module
|
||||
protected function csvExport($datas)
|
||||
{
|
||||
$this->_sort = $datas['defaultSortColumn'];
|
||||
$this->setLang(Context::getContext()->language->id);
|
||||
$context = Context::getContext();
|
||||
$this->setLang($context->language->id);
|
||||
$this->setEmployee($context->employee->id);
|
||||
|
||||
if (isset($datas['option'])) {
|
||||
$this->setOption($datas['option'], $layers);
|
||||
}
|
||||
|
||||
@@ -1049,22 +1049,27 @@ class AdminCustomersControllerCore extends AdminController
|
||||
$customer = new Customer();
|
||||
if (Validate::isEmail($customer_email)) {
|
||||
$customer->getByEmail($customer_email);
|
||||
}
|
||||
if ($customer->id) {
|
||||
$this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$customer_email;
|
||||
if ($customer->id) {
|
||||
$this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$customer_email;
|
||||
$this->display = 'edit';
|
||||
return $customer;
|
||||
} elseif (trim(Tools::getValue('passwd')) == '') {
|
||||
$this->validateRules();
|
||||
$this->errors[] = Tools::displayError('Password can not be empty.');
|
||||
$this->display = 'edit';
|
||||
} elseif ($customer = parent::processAdd()) {
|
||||
$this->context->smarty->assign('new_customer', $customer);
|
||||
return $customer;
|
||||
}
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('Invalid email address.');
|
||||
$this->display = 'edit';
|
||||
return $customer;
|
||||
} elseif (trim(Tools::getValue('passwd')) == '') {
|
||||
$this->validateRules();
|
||||
$this->errors[] = Tools::displayError('Password can not be empty.');
|
||||
$this->display = 'edit';
|
||||
} elseif ($customer = parent::processAdd()) {
|
||||
$this->context->smarty->assign('new_customer', $customer);
|
||||
return $customer;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public function processUpdate()
|
||||
{
|
||||
if (Validate::isLoadedObject($this->object)) {
|
||||
@@ -1075,7 +1080,10 @@ class AdminCustomersControllerCore extends AdminController
|
||||
$customer = new Customer();
|
||||
if (Validate::isEmail($customer_email)) {
|
||||
$customer->getByEmail($customer_email);
|
||||
} else {
|
||||
$this->errors[] = Tools::displayError('Invalid email address.');
|
||||
}
|
||||
|
||||
if (($customer->id) && ($customer->id != (int)$this->object->id)) {
|
||||
$this->errors[] = Tools::displayError('An account already exists for this email address:').' '.$customer_email;
|
||||
}
|
||||
|
||||
@@ -2992,7 +2992,7 @@ class AdminNormalProductsControllerCore extends AdminController
|
||||
->setUseSearch(false)
|
||||
->setFullTree(0)
|
||||
->setSelectedCategories($categories)
|
||||
->setUseBulkActions(false);
|
||||
->setUseBulkActions(true);
|
||||
|
||||
$data->assign(array('default_category' => $default_category,
|
||||
'selected_cat_ids' => implode(',', array_keys($selected_cat)),
|
||||
@@ -3508,7 +3508,7 @@ class AdminNormalProductsControllerCore extends AdminController
|
||||
->setRoomsOnly(false)
|
||||
->setSelectedHotels($selectedElements['hotels'])
|
||||
->setSelectedRoomTypes($selectedElements['room_types'])
|
||||
->setUseBulkActions(false)
|
||||
->setUseBulkActions(true)
|
||||
->setAccessedHotels(HotelBranchInformation::getProfileAccessedHotels($this->context->employee->id_profile, 1, 0));
|
||||
|
||||
$data->assign('hotel_tree', $tree->render());
|
||||
|
||||
@@ -5278,20 +5278,23 @@ class AdminOrdersControllerCore extends AdminController
|
||||
// update order detail for selected aditional services
|
||||
foreach ($selectedAdditonalServices['additional_services'] as $service) {
|
||||
$serviceOrderDetail = new OrderDetail($service['id_order_detail']);
|
||||
if ($service['quantity'] >= $serviceOrderDetail->product_quantity) {
|
||||
|
||||
$cart_quantity = $service['quantity'];
|
||||
if ($service['product_price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY) {
|
||||
$cart_quantity = $cart_quantity * $product_quantity;
|
||||
}
|
||||
if ($cart_quantity >= $serviceOrderDetail->product_quantity) {
|
||||
$serviceOrderDetail->delete();
|
||||
} else {
|
||||
$order_detail->total_price_tax_incl -= Tools::ps_round($service['total_price_tax_incl'], 6);
|
||||
$order_detail->total_price_tax_excl -= Tools::ps_round($service['total_price_tax_excl'], 6);
|
||||
|
||||
$serviceOldQuantity = $serviceOrderDetail->product_quantity;
|
||||
$serviceOrderDetail->product_quantity = $serviceOldQuantity - $service['quantity'];
|
||||
$serviceOrderDetail->total_price_tax_incl -= Tools::ps_round($service['total_price_tax_incl'], 6);
|
||||
$serviceOrderDetail->total_price_tax_excl -= Tools::ps_round($service['total_price_tax_excl'], 6);
|
||||
$serviceOrderDetail->product_quantity -= $cart_quantity;
|
||||
|
||||
// update taxes
|
||||
$res &= $order_detail->updateTaxAmount($order);
|
||||
$res &= $serviceOrderDetail->updateTaxAmount($order);
|
||||
|
||||
// Save order detail
|
||||
$res &= $order_detail->update();
|
||||
$res &= $serviceOrderDetail->update();
|
||||
}
|
||||
}
|
||||
/*End*/
|
||||
|
||||
@@ -2202,10 +2202,14 @@ class AdminProductsControllerCore extends AdminController
|
||||
}
|
||||
|
||||
if (!$res) {
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The %s field is invalid.'),
|
||||
call_user_func(array($className, 'displayFieldName'), $field, $className)
|
||||
);
|
||||
if (Tools::strtolower($field) == 'wholesale_price') {
|
||||
$this->errors[] = Tools::displayError('The Pre-tax operating cost field is invalid.');
|
||||
} else {
|
||||
$this->errors[] = sprintf(
|
||||
Tools::displayError('The %s field is invalid.'),
|
||||
call_user_func(array($className, 'displayFieldName'), $field, $className)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ class ContactControllerCore extends FrontController
|
||||
SELECT cm.id_customer_thread FROM '._DB_PREFIX_.'customer_thread cm
|
||||
WHERE cm.id_customer_thread = '.(int)$id_customer_thread.' AND cm.id_shop = '.(int)$this->context->shop->id.' AND token = \''.pSQL(Tools::getValue('token')).'\'')
|
||||
) || (
|
||||
$id_customer_thread = CustomerThread::getIdCustomerThreadByEmailAndIdOrder($from, $id_order)
|
||||
$id_customer_thread = CustomerThread::getIdCustomerThreadByEmailAndIdOrder($from, $id_order, $id_contact)
|
||||
))) {
|
||||
$fields = Db::getInstance()->executeS('
|
||||
SELECT cm.id_customer_thread, cm.id_contact, cm.id_customer, cm.id_order, cm.id_product, cm.email
|
||||
|
||||
@@ -175,6 +175,7 @@ class OrderConfirmationControllerCore extends FrontController
|
||||
$order_bk_data = $obj_htl_bk_dtl->getOnlyOrderBookingData($idOrder, $customer->id_guest, $type_value['product_id']);
|
||||
}
|
||||
if ($rm_dtl = $obj_rm_type->getRoomTypeInfoByIdProduct($type_value['product_id'])) {
|
||||
$cart_htl_data[$type_key]['id_order'] = $idOrder;
|
||||
$cart_htl_data[$type_key]['id_product'] = $type_value['product_id'];
|
||||
$cart_htl_data[$type_key]['cover_img'] = $cover_img;
|
||||
$cart_htl_data[$type_key]['adults'] = $rm_dtl['adults'];
|
||||
@@ -366,9 +367,6 @@ class OrderConfirmationControllerCore extends FrontController
|
||||
}
|
||||
}
|
||||
|
||||
if (!empty($cart_htl_data)) {
|
||||
$this->context->smarty->assign('cart_htl_data', $cart_htl_data);
|
||||
}
|
||||
if (!empty($cart_service_products)) {
|
||||
$this->context->smarty->assign('cart_service_products', $cart_service_products);
|
||||
}
|
||||
@@ -399,6 +397,10 @@ class OrderConfirmationControllerCore extends FrontController
|
||||
$this->context->smarty->assign('orders_has_invoice', $orders_has_invoice);
|
||||
}
|
||||
|
||||
if (!empty($cart_htl_data)) {
|
||||
$this->context->smarty->assign('cart_htl_data', $cart_htl_data);
|
||||
}
|
||||
|
||||
$shw_bo_msg = Configuration::get('WK_SHOW_MSG_ON_BO');
|
||||
$bo_msg = Configuration::get('WK_BO_MESSAGE');
|
||||
$this->context->smarty->assign(
|
||||
@@ -469,6 +471,8 @@ class OrderConfirmationControllerCore extends FrontController
|
||||
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
|
||||
$this->addJqueryUI('ui.tooltip', 'base', true);
|
||||
}
|
||||
|
||||
@@ -145,10 +145,10 @@
|
||||
<url_rewrite>prodejny</url_rewrite>
|
||||
</meta>
|
||||
<meta id="order-opc" id_shop="1">
|
||||
<title>Objednávka</title>
|
||||
<title>Rychlá Objednávka</title>
|
||||
<description/>
|
||||
<keywords/>
|
||||
<url_rewrite>objednavka</url_rewrite>
|
||||
<url_rewrite>rychla-objednavka</url_rewrite>
|
||||
</meta>
|
||||
<meta id="guest-tracking" id_shop="1">
|
||||
<title>Sledování objednávky návštěvníka</title>
|
||||
|
||||
@@ -123,15 +123,12 @@ function calcPrice()
|
||||
function calcPriceTI()
|
||||
{
|
||||
|
||||
var priceTE = parseFloat(document.getElementById('priceTEReal').value.replace(/,/g, '.'));
|
||||
var priceTE = parseFloat($('#priceTEReal').val().replace(/,/g, '.'));
|
||||
var newPrice = addTaxes(priceTE);
|
||||
|
||||
document.getElementById('priceTI').value = (isNaN(newPrice) == true || newPrice < 0) ? '' :
|
||||
ps_round(newPrice, priceDisplayPrecision);
|
||||
document.getElementById('finalPrice').innerHTML = (isNaN(newPrice) == true || newPrice < 0) ? '' :
|
||||
ps_round(newPrice, priceDisplayPrecision).toFixed(priceDisplayPrecision);
|
||||
document.getElementById('finalPriceWithoutTax').innerHTML = (isNaN(priceTE) == true || priceTE < 0) ? '' :
|
||||
(ps_round(priceTE, 6)).toFixed(6);
|
||||
$('#priceTI').val((isNaN(newPrice) == true || newPrice < 0) ? '' : ps_round(newPrice, priceDisplayPrecision));
|
||||
$('#finalPrice').html((isNaN(newPrice) == true || newPrice < 0) ? '' : ps_round(newPrice, priceDisplayPrecision).toFixed(priceDisplayPrecision));
|
||||
$('#finalPriceWithoutTax').html((isNaN(priceTE) == true || priceTE < 0) ? '' : (ps_round(priceTE, 6)).toFixed(6));
|
||||
calcReduction();
|
||||
|
||||
if (isNaN(parseFloat($('#priceTI').val())))
|
||||
@@ -149,15 +146,13 @@ function calcPriceTI()
|
||||
function calcPriceTE()
|
||||
{
|
||||
ecotax_tax_excl = $('#ecotax').val() / (1 + ecotaxTaxRate);
|
||||
var priceTI = parseFloat(document.getElementById('priceTI').value.replace(/,/g, '.'));
|
||||
var priceTI = parseFloat($('#priceTI').val().replace(/,/g, '.'));
|
||||
var newPrice = removeTaxes(ps_round(priceTI - getEcotaxTaxIncluded(), priceDisplayPrecision));
|
||||
document.getElementById('priceTE').value = (isNaN(newPrice) == true || newPrice < 0) ? '' :
|
||||
ps_round(newPrice, 6).toFixed(6);
|
||||
document.getElementById('priceTEReal').value = (isNaN(newPrice) == true || newPrice < 0) ? 0 : ps_round(newPrice, 9);
|
||||
document.getElementById('finalPrice').innerHTML = (isNaN(newPrice) == true || newPrice < 0) ? '' :
|
||||
ps_round(priceTI, priceDisplayPrecision).toFixed(priceDisplayPrecision);
|
||||
document.getElementById('finalPriceWithoutTax').innerHTML = (isNaN(newPrice) == true || newPrice < 0) ? '' :
|
||||
(ps_round(newPrice, 6)).toFixed(6);
|
||||
|
||||
$('#priceTE').val((isNaN(newPrice) == true || newPrice < 0) ? '' : ps_round(newPrice, 6).toFixed(6));
|
||||
$('#priceTEReal').val((isNaN(newPrice) == true || newPrice < 0) ? 0 : ps_round(newPrice, 9));
|
||||
$('#finalPrice').html((isNaN(newPrice) == true || newPrice < 0) ? '' : ps_round(priceTI, priceDisplayPrecision).toFixed(priceDisplayPrecision));
|
||||
$('#finalPriceWithoutTax').html((isNaN(newPrice) == true || newPrice < 0) ? '' : (ps_round(newPrice, 6)).toFixed(6));
|
||||
calcReduction();
|
||||
}
|
||||
|
||||
|
||||
@@ -2597,7 +2597,7 @@
|
||||
if (opt.endDate && compare_month(nextMonth(defaultTime), opt.endDate) > 0) defaultTime = prevMonth(moment(opt.endDate).toDate());
|
||||
}
|
||||
|
||||
if (opt.singleDate) {
|
||||
if (opt.singleDate || opt.singleMonth) {
|
||||
if (opt.startDate && compare_month(defaultTime, opt.startDate) < 0) defaultTime = moment(opt.startDate).toDate();
|
||||
if (opt.endDate && compare_month(defaultTime, opt.endDate) > 0) defaultTime = moment(opt.endDate).toDate();
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -53,7 +53,7 @@ function formatNumber(value, numberOfDecimal, thousenSeparator, virgule)
|
||||
|
||||
if (parseInt(numberOfDecimal) === 0)
|
||||
return abs_val_string;
|
||||
return abs_val_string + virgule + (deci_string > 0 ? deci_string : '00');
|
||||
return abs_val_string + virgule + deci_string;
|
||||
}
|
||||
|
||||
function formatCurrency(price, currencyFormat, currencySign, currencyBlank)
|
||||
|
||||
@@ -84,11 +84,22 @@ class Blocknewsletter extends Module
|
||||
'actionCustomerAccountAdd',
|
||||
'registerGDPRConsent',
|
||||
'actionExportGDPRData',
|
||||
'actionDeleteGDPRCustomer'
|
||||
'actionDeleteGDPRCustomer',
|
||||
'actionObjectCustomerDeleteAfter',
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
public function hookActionObjectCustomerDeleteAfter($params)
|
||||
{
|
||||
$objCustomer = $params['object'];
|
||||
if (($register_status = $this->isNewsletterRegistered($objCustomer->email))
|
||||
&& $register_status > 0
|
||||
) {
|
||||
$this->unregister($objCustomer->email, $register_status);
|
||||
}
|
||||
}
|
||||
|
||||
public function hookActionExportGDPRData($customer)
|
||||
{
|
||||
if (!Tools::isEmpty($customer['email']) && Validate::isEmail($customer['email'])) {
|
||||
|
||||
@@ -266,6 +266,7 @@ class Dashactivity extends Module
|
||||
SELECT COUNT(*)
|
||||
FROM `'._DB_PREFIX_.'customer`
|
||||
WHERE `date_add` BETWEEN "'.pSQL($params['date_from']).'" AND "'.pSQL($params['date_to']).'"
|
||||
AND `deleted` = 0
|
||||
'.Shop::addSqlRestriction(Shop::SHARE_ORDER)
|
||||
);
|
||||
|
||||
|
||||
@@ -43,11 +43,9 @@
|
||||
color: #555555;
|
||||
}
|
||||
|
||||
#dashactivity .value {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
text-align: right;
|
||||
#dashactivity .dash-live {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#dashactivity .value span {
|
||||
@@ -75,6 +73,11 @@
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
#dashactivity .stats-list > li {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#dashactivity .stats-list > li:not(:last-child) {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
@@ -90,12 +93,6 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#dashactivity .stats-list .item-value {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
#dashactivity .stats-list .item-value span {
|
||||
font-weight: bold;
|
||||
font-size: 16px;
|
||||
|
||||
@@ -41,34 +41,35 @@
|
||||
</section>
|
||||
|
||||
<section class="activity-section dash-live">
|
||||
<span class="title">
|
||||
<div class="title">
|
||||
<a href="{$link->getAdminLink("AdminStats")|escape:"html":"UTF-8"}&module=statslive" target="_blank">
|
||||
<span>{l s="Online Visitors" mod='dashactivity'}</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class="value">
|
||||
<div class="sub-title">
|
||||
<small class="text-muted">
|
||||
{l s="in the last %d minutes" sprintf=$DASHACTIVITY_VISITOR_ONLINE|intval mod='dashactivity'}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
<div class="value">
|
||||
<span id="online_visitor"></span>
|
||||
</span>
|
||||
<div class="sub-title">
|
||||
<small class="text-muted">
|
||||
{l s="in the last %d minutes" sprintf=$DASHACTIVITY_VISITOR_ONLINE|intval mod='dashactivity'}
|
||||
</small>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="activity-section dash-live">
|
||||
<span class="title">
|
||||
<div class="title">
|
||||
<a href="{$link->getAdminLink("AdminCarts")|escape:"html":"UTF-8"}" target="_blank">
|
||||
<span>{l s="Active Booking Carts" mod='dashactivity'}</span>
|
||||
</a>
|
||||
</span>
|
||||
<span class="value">
|
||||
<div class="sub-title">
|
||||
<small class="text-muted">
|
||||
{l s="in the last %d minutes" sprintf=$DASHACTIVITY_CART_ACTIVE|intval mod='dashactivity'}
|
||||
</small>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="value">
|
||||
<span id="active_shopping_cart"></span>
|
||||
</span>
|
||||
<div class="sub-title">
|
||||
<small class="text-muted">
|
||||
{l s="in the last %d minutes" sprintf=$DASHACTIVITY_CART_ACTIVE|intval mod='dashactivity'}
|
||||
</small>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
top: -50px;
|
||||
bottom: 50px;
|
||||
left: -50px;
|
||||
right: 50px;
|
||||
right: -50px;
|
||||
width: calc(100% + 100px);
|
||||
height: calc(100% + 100px);
|
||||
}
|
||||
|
||||
@@ -91,7 +91,8 @@ class GraphNvD3 extends ModuleGraphEngine
|
||||
.x(function(d) { return d.label; })
|
||||
.y(function(d) { return d.value; })
|
||||
.showLabels(true)
|
||||
.showLegend(false)'
|
||||
.labelType("percent")'
|
||||
.((isset($params['format']) && $params['format']) ? '.valueFormat(d3.format("'.$params['format'].'"))' : '')
|
||||
);
|
||||
|
||||
return '
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
<span>{$allotment_type.name|escape:'htmlall':'UTF-8'}</span>
|
||||
</label>
|
||||
{/foreach}
|
||||
<input type="text" id="comment_{$avai_v['id_room']|escape:'htmlall':'UTF-8'}" class="form-control booking_type_comment" placeholder="{l s='Allotment message' mod='hotelreservationsystem'}">
|
||||
<input type="text" id="comment_{$avai_v['id_room']|escape:'htmlall':'UTF-8'}" name="comment_{$avai_v['id_room']|escape:'htmlall':'UTF-8'}" class="form-control booking_type_comment" placeholder="{l s='Allotment message' mod='hotelreservationsystem'}">
|
||||
</td>
|
||||
{if $occupancy_required_for_booking}
|
||||
<td class="booking_occupancy">
|
||||
@@ -138,7 +138,7 @@
|
||||
<span>{$allotment_type.name|escape:'htmlall':'UTF-8'}</span>
|
||||
</label>
|
||||
{/foreach}
|
||||
<input type="text" id="comment_{$sub_part_v['id_room']|escape:'htmlall':'UTF-8'}_{$sub_part_k|escape:'htmlall':'UTF-8'}" class="form-control booking_type_comment" placeholder="{l s='Allotment message' mod='hotelreservationsystem'}">
|
||||
<input type="text" id="comment_{$sub_part_v['id_room']|escape:'htmlall':'UTF-8'}_{$sub_part_k|escape:'htmlall':'UTF-8'}" name="comment_{$sub_part_v['id_room']|escape:'htmlall':'UTF-8'}_{$sub_part_k|escape:'htmlall':'UTF-8'}" class="form-control booking_type_comment" placeholder="{l s='Allotment message' mod='hotelreservationsystem'}">
|
||||
</td>
|
||||
{if $occupancy_required_for_booking}
|
||||
<td class="booking_occupancy">
|
||||
|
||||
@@ -229,10 +229,6 @@ class QloStatsServiceProducts extends ModuleGrid
|
||||
)
|
||||
AND p.`booking_product` = 0)';
|
||||
|
||||
$this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(
|
||||
'SELECT COUNT(p.`id_product`) FROM '._DB_PREFIX_.'product p WHERE p.`booking_product` = 0 AND p.`active` = 1'
|
||||
);
|
||||
|
||||
$this->option = 'services';
|
||||
}
|
||||
|
||||
@@ -278,10 +274,6 @@ class QloStatsServiceProducts extends ModuleGrid
|
||||
WHERE o.valid = 1 AND o.invoice_date BETWEEN '.$dateBetween.'
|
||||
'.HotelBranchInformation::addHotelRestriction(false, 'hbd').' ))';
|
||||
|
||||
$this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue(
|
||||
'SELECT COUNT(`id_global_demand`) FROM '._DB_PREFIX_.'htl_room_type_global_demand'
|
||||
);
|
||||
|
||||
$this->option = 'facilities';
|
||||
}
|
||||
|
||||
@@ -299,6 +291,7 @@ class QloStatsServiceProducts extends ModuleGrid
|
||||
$this->query .= ' LIMIT '.(int)$this->_start.', '.(int)$this->_limit;
|
||||
|
||||
$values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->query);
|
||||
$this->_totalCount = Db::getInstance()->NumRows();
|
||||
foreach ($values as &$value)
|
||||
{
|
||||
if (!Tools::getValue('export')) {
|
||||
|
||||
@@ -62,7 +62,7 @@ class StatsBestCategories extends ModuleGrid
|
||||
),
|
||||
array(
|
||||
'id' => 'totalRoomsBooked',
|
||||
'header' => $this->l('Rooms booked'),
|
||||
'header' => $this->l('Room nights booked'),
|
||||
'dataIndex' => 'totalRoomsBooked',
|
||||
'align' => 'center',
|
||||
'tooltip' => $this->l('The room nights booked for the hotel.'),
|
||||
@@ -165,7 +165,7 @@ class StatsBestCategories extends ModuleGrid
|
||||
SELECT IFNULL(SUM(DATEDIFF(LEAST(hbd.`date_to`, "'.pSQL($date_to).'"), GREATEST(hbd.`date_from`, "'.pSQL($date_from).'"))), 0)
|
||||
FROM `'._DB_PREFIX_.'htl_booking_detail` hbd
|
||||
LEFT JOIN `'._DB_PREFIX_.'orders` o ON (o.`id_order` = hbd.`id_order`)
|
||||
WHERE hbd.`id_hotel` = hbi.`id` AND o.`valid` = 1
|
||||
WHERE hbd.`id_hotel` = hbi.`id` AND o.`valid` = 1 AND is_refunded = 0
|
||||
AND hbd.`date_to` > "'.pSQL($date_from).'" AND hbd.`date_from` < "'.pSQL($date_to).'"
|
||||
) AS totalRoomsBooked,
|
||||
(
|
||||
|
||||
@@ -70,7 +70,7 @@ class StatsBestProducts extends ModuleGrid
|
||||
),
|
||||
array(
|
||||
'id' => 'totalRoomsBooked',
|
||||
'header' => $this->l('Rooms booked'),
|
||||
'header' => $this->l('Room nights booked'),
|
||||
'dataIndex' => 'totalRoomsBooked',
|
||||
'tooltip' => $this->l('The room nights booked for the room type.'),
|
||||
'align' => 'center',
|
||||
@@ -96,7 +96,7 @@ class StatsBestProducts extends ModuleGrid
|
||||
),
|
||||
array(
|
||||
'id' => 'availableRooms',
|
||||
'header' => $this->l('Available rooms'),
|
||||
'header' => $this->l('Room nights available'),
|
||||
'dataIndex' => 'availableRooms',
|
||||
'tooltip' => $this->l('The room nights available for booking for the room type.'),
|
||||
'align' => 'center',
|
||||
@@ -168,7 +168,10 @@ class StatsBestProducts extends ModuleGrid
|
||||
AND hbd.`date_to` > "'.pSQL($date_from).'" AND hbd.`date_from` < "'.pSQL($date_to).'"
|
||||
) AS totalRoomsBooked,
|
||||
(
|
||||
SELECT IFNULL(AVG(hbd.`total_price_tax_excl` / o.`conversion_rate`), 0)
|
||||
SELECT IFNULL(ROUND(
|
||||
SUM(hbd.`total_price_tax_excl` * DATEDIFF(LEAST(hbd.`date_to`, "'.pSQL($date_to).'"), GREATEST(hbd.`date_from`, "'.pSQL($date_from).'")) / (o.`conversion_rate` * DATEDIFF(hbd.`date_to`, hbd.`date_from`))) / SUM(DATEDIFF(LEAST(hbd.`date_to`, "'.pSQL($date_to).'"), GREATEST(hbd.`date_from`, "'.pSQL($date_from).'"))),
|
||||
2
|
||||
), 0)
|
||||
FROM `'._DB_PREFIX_.'htl_booking_detail` hbd
|
||||
LEFT JOIN `'._DB_PREFIX_.'orders` o
|
||||
ON (o.`id_order` = hbd.`id_order`)
|
||||
@@ -176,7 +179,10 @@ class StatsBestProducts extends ModuleGrid
|
||||
AND hbd.`date_to` > "'.pSQL($date_from).'" AND hbd.`date_from` < "'.pSQL($date_to).'"
|
||||
) AS sellingPrice,
|
||||
(
|
||||
SELECT IFNULL(SUM(ROUND((DATEDIFF(LEAST(hbd.`date_to`, "'.pSQL($date_to).'"), GREATEST(hbd.`date_from`, "'.pSQL($date_from).'")) / DATEDIFF(hbd.`date_to`, hbd.`date_from`)) * (hbd.`total_price_tax_excl` / o.`conversion_rate`) , 2)), 0)
|
||||
SELECT IFNULL(ROUND(
|
||||
SUM(hbd.`total_price_tax_excl` * DATEDIFF(LEAST(hbd.`date_to`, "'.pSQL($date_to).'"), GREATEST(hbd.`date_from`, "'.pSQL($date_from).'")) / (o.`conversion_rate` * DATEDIFF(hbd.`date_to`, hbd.`date_from`))),
|
||||
2
|
||||
), 0)
|
||||
FROM `'._DB_PREFIX_.'htl_booking_detail` hbd
|
||||
LEFT JOIN `'._DB_PREFIX_.'orders` o
|
||||
ON (o.`id_order` = hbd.`id_order`)
|
||||
@@ -229,18 +235,17 @@ class StatsBestProducts extends ModuleGrid
|
||||
if (Tools::getValue('export') == false) {
|
||||
$value['roomTypeName'] = '<a href="'.$this->context->link->getAdminLink('AdminProducts').'&id_product='.$value['id_product'].'&updateproduct" target="_blank">'.$value['roomTypeName'].'</a>';
|
||||
$value['hotelName'] = '<a href="'.$this->context->link->getAdminLink('AdminAddHotel').'&id='.$value['id_hotel'].'&updatehtl_branch_info" target="_blank">'.$value['hotelName'].'</a>';
|
||||
if ($value['active']) {
|
||||
$value['active'] = '<span class="badge badge-success">'.$this->l('Yes').'</span>';
|
||||
} else {
|
||||
$value['active'] = '<span class="badge badge-danger">'.$this->l('No').'</span>';
|
||||
}
|
||||
}
|
||||
$value['totalRoomsBooked'] = (int) $value['totalRoomsBooked'];
|
||||
$value['availableRooms'] = max($value['totalRooms'] - $value['totalRoomsBooked'], 0); // availableRooms can be negative if more rooms are disabled than available for booking
|
||||
$value['bookingsPerDay'] = sprintf('%0.2f', ($numberOfDays ? $value['totalRoomsBooked'] / $numberOfDays : 0));
|
||||
$value['sellingPrice'] = Tools::displayPrice($value['sellingPrice'], $currency);
|
||||
$value['totalRevenue'] = Tools::displayPrice($value['totalRevenue'], $currency);
|
||||
|
||||
if ($value['active']) {
|
||||
$value['active'] = '<span class="badge badge-success">'.$this->l('Yes').'</span>';
|
||||
} else {
|
||||
$value['active'] = '<span class="badge badge-danger">'.$this->l('No').'</span>';
|
||||
}
|
||||
}
|
||||
|
||||
$this->_values = $values;
|
||||
|
||||
@@ -461,7 +461,7 @@ class StatsForecast extends Module
|
||||
<td class="text-left">'.(int)$payment['nb'].'</td>
|
||||
<td class="text-left">'.Tools::displayPrice($payment['total'], $currency).'</td>
|
||||
<td class="text-left">'.sprintf('%0.2f', ($ca['ventil']['nb'] ? ($payment['nb'] / $ca['ventil']['nb']) * 100 : 0)).'%</td>
|
||||
<td class="text-left">'.sprintf('%0.2f', ($ca['ventil']['nb'] ? ($payment['total'] / $ca['ventil']['total_incl']) * 100 : 0)).'%</td>
|
||||
<td class="text-left">'.sprintf('%0.2f', ($ca['ventil']['total_incl'] > 0 ? ($payment['total'] / $ca['ventil']['total_incl']) * 100 : 0)).'%</td>
|
||||
<td class="text-left">'.Tools::displayPrice($payment['total'] / (int)$payment['nb'], $currency).'</td>
|
||||
</tr>';
|
||||
}
|
||||
@@ -492,7 +492,7 @@ class StatsForecast extends Module
|
||||
<tr>
|
||||
<td class="text-left">'.$ophone.'</td>
|
||||
<td class="text-left">'.Tools::displayPrice($amount, $currency).'</td>
|
||||
<td class="text-left">'.sprintf('%0.2f', ($ca['ventil']['total'] ? ($amount / $ca['ventil']['total']) * 100 : 0)).'%</td>
|
||||
<td class="text-left">'.sprintf('%0.2f', ($ca['ventil']['total'] > 0 ? ($amount / $ca['ventil']['total']) * 100 : 0)).'%</td>
|
||||
</tr>';
|
||||
}
|
||||
} else {
|
||||
@@ -526,7 +526,7 @@ class StatsForecast extends Module
|
||||
<td class="text-left">'.(int)($zone['nb']).'</td>
|
||||
<td class="text-left">'.Tools::displayPrice($zone['total'], $currency).'</td>
|
||||
<td class="text-left">'.sprintf('%0.2f', $ca['ventil']['nb'] ? ($zone['nb'] / $ca['ventil']['nb']) * 100 : 0).'%</td>
|
||||
<td class="text-left">'.sprintf('%0.2f', $ca['ventil']['total'] ? ($zone['total'] / $ca['ventil']['total']) * 100 : 0).'%</td>
|
||||
<td class="text-left">'.sprintf('%0.2f', $ca['ventil']['total'] > 0 ? ($zone['total'] / $ca['ventil']['total']) * 100 : 0).'%</td>
|
||||
</tr>';
|
||||
}
|
||||
} else {
|
||||
@@ -577,7 +577,7 @@ class StatsForecast extends Module
|
||||
<td class="text-left">'.(int)($currency_row['nb']).'</td>
|
||||
<td class="text-left">'.Tools::displayPrice($currency_row['total'], $currency).'</td>
|
||||
<td class="text-left">'.sprintf('%0.2f', $ca['ventil']['nb'] ? ($currency_row['nb'] / $ca['ventil']['nb']) * 100 : 0).'%</td>
|
||||
<td class="text-left">'.sprintf('%0.2f', $ca['ventil']['total'] ? ($currency_row['total'] / $ca['ventil']['total']) * 100 : 0).'%</td>
|
||||
<td class="text-left">'.sprintf('%0.2f', $ca['ventil']['total'] > 0 ? ($currency_row['total'] / $ca['ventil']['total']) * 100 : 0).'%</td>
|
||||
</tr>';
|
||||
}
|
||||
} else {
|
||||
@@ -677,6 +677,7 @@ class StatsForecast extends Module
|
||||
LEFT JOIN `'._DB_PREFIX_.'currency` cu ON o.id_currency = cu.id_currency
|
||||
'.$join.'
|
||||
WHERE o.`id_order` IN ('.pSQL($idOrders).')
|
||||
'.$where.'
|
||||
GROUP BY o.id_currency
|
||||
ORDER BY total DESC';
|
||||
$ca['currencies'] = Db::getInstance()->executeS($sql);
|
||||
|
||||
@@ -116,7 +116,8 @@ class StatsPersonalInfos extends ModuleGraph
|
||||
<div class="col-lg-8">
|
||||
'.$this->engine(array(
|
||||
'type' => 'pie',
|
||||
'option' => 'gender'
|
||||
'option' => 'gender',
|
||||
'format' => 'd'
|
||||
)).'
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
@@ -133,7 +134,8 @@ class StatsPersonalInfos extends ModuleGraph
|
||||
<div class="col-lg-8">
|
||||
'.$this->engine(array(
|
||||
'type' => 'pie',
|
||||
'option' => 'age'
|
||||
'option' => 'age',
|
||||
'format' => 'd'
|
||||
)).'
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
@@ -150,7 +152,8 @@ class StatsPersonalInfos extends ModuleGraph
|
||||
<div class="col-lg-8">
|
||||
'.$this->engine(array(
|
||||
'type' => 'pie',
|
||||
'option' => 'country'
|
||||
'option' => 'country',
|
||||
'format' => 'd'
|
||||
)).'
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
@@ -167,7 +170,8 @@ class StatsPersonalInfos extends ModuleGraph
|
||||
<div class="col-lg-8">
|
||||
'.$this->engine(array(
|
||||
'type' => 'pie',
|
||||
'option' => 'currency'
|
||||
'option' => 'currency',
|
||||
'format' => 'd'
|
||||
)).'
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
|
||||
@@ -132,7 +132,9 @@ class StatsProduct extends ModuleGraph
|
||||
|
||||
private function getSales($id_product)
|
||||
{
|
||||
$sql = 'SELECT o.`date_add`, o.`id_order`, o.`id_customer`, c.`firstname`, c.`lastname`, od.`product_quantity`, (od.`product_price` * od.`product_quantity`) AS total, od.`tax_name`, od.`product_name`, SUM(DATEDIFF(hbd.`date_to`, hbd.`date_from`)) AS total_booked
|
||||
$sql = 'SELECT o.`date_add`, o.`id_order`, o.`id_customer`, c.`firstname`, c.`lastname`, od.`product_quantity`,
|
||||
(od.`product_price` * od.`product_quantity`) AS total, od.`tax_name`, od.`product_name`, o.`id_currency`,
|
||||
SUM(DATEDIFF(hbd.`date_to`, hbd.`date_from`)) AS total_booked
|
||||
FROM `'._DB_PREFIX_.'orders` o
|
||||
LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON o.`id_order` = od.`id_order`
|
||||
LEFT JOIN `'._DB_PREFIX_.'htl_booking_detail` hbd ON (od.`id_order` = hbd.`id_order` AND od.`product_id` = hbd.`id_product`)
|
||||
@@ -266,7 +268,7 @@ class StatsProduct extends ModuleGraph
|
||||
<td class="text-left"><a href="?tab=AdminCustomers&id_customer='.$sale['id_customer'].'&viewcustomer&token='.$token_customer.'" target="_blank">'.$sale['firstname'].' '.$sale['lastname'].' (#'.(int) $sale['id_customer'].')'.'</a></td>
|
||||
'.($has_attribute ? '<td>'.$sale['product_name'].'</td>' : '').'
|
||||
<td>'.(int)$sale['total_booked'].'</td>
|
||||
<td>'.Tools::displayprice($sale['total'], $currency).'</td>
|
||||
<td>'.Tools::displayprice($sale['total'], (int)$sale['id_currency']).'</td>
|
||||
</tr>';
|
||||
}
|
||||
$this->html .= '
|
||||
@@ -332,7 +334,7 @@ class StatsProduct extends ModuleGraph
|
||||
$this->html .= '
|
||||
</tbody>
|
||||
</table>
|
||||
<a class="btn btn-default export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI'].'&export=1').'">
|
||||
<a class="btn btn-default export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI'].'&export=1').($id_hotel ? '&id_hotel='.(int)$id_hotel : '').'">
|
||||
<i class="icon-cloud-download"></i> '.$this->l('CSV Export').'
|
||||
</a>';
|
||||
}
|
||||
@@ -356,7 +358,6 @@ class StatsProduct extends ModuleGraph
|
||||
}
|
||||
$this->_titles['main'][] = $this->l('Room nights');
|
||||
$this->_titles['main'][] = $this->l('Views (x100)');
|
||||
$this->_titles['x'] = $this->l('Date');
|
||||
$this->_titles['y'] = $this->l('Room nights, Views (x100)');
|
||||
$this->_formats['y'] = 'd';
|
||||
|
||||
|
||||
@@ -176,6 +176,7 @@ class StatsSales extends ModuleGraph
|
||||
'.($totals['orderCount'] ? $this->engine(array(
|
||||
'type' => 'pie',
|
||||
'option' => '3-'.(int)Tools::getValue('id_country').'-'.(int)Tools::getValue('id_hotel'),
|
||||
'format' => 'd'
|
||||
)) : $this->l('No orders found.')).'
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
|
||||
@@ -213,6 +213,12 @@
|
||||
text-transform: uppercase;
|
||||
border: none;
|
||||
border-radius: 4px;}
|
||||
.submit_occupancy_btn {
|
||||
background-color: #1292FF;
|
||||
font-size: 13px;
|
||||
border: none;
|
||||
padding: 5px 20px;
|
||||
border-radius: 4px;}
|
||||
|
||||
|
||||
/* occupancy */
|
||||
@@ -223,7 +229,7 @@
|
||||
overflow: auto;
|
||||
box-shadow: 0 8px 25px -4px rgba(0,0,0,0.39);
|
||||
left: 0px;
|
||||
padding: 20px;}
|
||||
padding: 12px 20px;}
|
||||
#search_occupancy_wrapper.top {
|
||||
top: unset;
|
||||
bottom: 100%; }
|
||||
|
||||
@@ -457,7 +457,6 @@ $(document).ready(function() {
|
||||
});
|
||||
} else {
|
||||
$('#daterange_value').dateRangePicker({
|
||||
startDate: $.datepicker.formatDate('dd-mm-yy', new Date()),
|
||||
startDate: start_date,
|
||||
endDate: max_order_date,
|
||||
}).on('datepicker-first-date-selected', function() {
|
||||
@@ -831,6 +830,15 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '#search_occupancy_wrapper .submit_occupancy_btn', function(e) {
|
||||
e.preventDefault();
|
||||
if ($('#search_occupancy_wrapper').length) {
|
||||
if ($('#search_occupancy_wrapper').css('display') !== 'none') {
|
||||
return validateOccupancies();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
var isEnterKeyHeldOnLocation = false;
|
||||
$('body').on('keydown', function(e) {
|
||||
let preventDefault = false;
|
||||
|
||||
@@ -1,3 +1,22 @@
|
||||
{*
|
||||
* Copyright 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
|
||||
*}
|
||||
|
||||
<form method="POST" id="search_hotel_block_form" class="grid">
|
||||
{if isset($location_enabled) && $location_enabled}
|
||||
<div class="form-group area-{$column_widths['location']}">
|
||||
@@ -191,8 +210,13 @@
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div id="add_new_occupancy">
|
||||
<a class="add_new_occupancy_btn" href="#"><i class="icon-plus"></i> <span>{l s='Add Room' mod='wkroomsearchblock'}</span></a>
|
||||
<div>
|
||||
<span id="add_new_occupancy">
|
||||
<a class="add_new_occupancy_btn" href="#"><i class="icon-plus"></i> <span>{l s='Add Room' mod='wkroomsearchblock'}</span></a>
|
||||
</span>
|
||||
<span>
|
||||
<button class="submit_occupancy_btn btn btn btn-primary pull-right">{l s='Done' mod='wkroomsearchblock'}</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -175,11 +175,16 @@
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
<div class="add_occupancy_block">
|
||||
<a class="add_new_occupancy_btn{if isset($occupancies) && $occupancies && isset($total_available_rooms) && $total_available_rooms <= count($occupancies)} disabled{/if}" data-title-available="{l s='Click to add more rooms.'}" data-title-unavailable="{l s='No more rooms available.'}" href="#">
|
||||
<i class="icon-plus"></i>
|
||||
<span>{l s='Add Room'}</span>
|
||||
</a>
|
||||
<div>
|
||||
<span class="add_occupancy_block">
|
||||
<a class="add_new_occupancy_btn{if isset($occupancies) && $occupancies && isset($total_available_rooms) && $total_available_rooms <= count($occupancies)} disabled{/if}" data-title-available="{l s='Click to add more rooms.'}" data-title-unavailable="{l s='No more rooms available.'}" href="#">
|
||||
<i class="icon-plus"></i>
|
||||
<span>{l s='Add Room'}</span>
|
||||
</a>
|
||||
</span>
|
||||
<span>
|
||||
<button type="submit" class="submit_occupancy_btn btn btn btn-primary pull-right">{l s='Done'}</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
193
themes/hotel-reservation-theme/css/order-confirmation.css
Normal file
193
themes/hotel-reservation-theme/css/order-confirmation.css
Normal file
@@ -0,0 +1,193 @@
|
||||
/**
|
||||
* 2010-2023 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through LICENSE.txt file inside our module
|
||||
*
|
||||
* 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 CustomizationPolicy.txt file inside our module for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright 2010-2023 Webkul IN
|
||||
* @license LICENSE.txt
|
||||
*/
|
||||
|
||||
.fancybox-wrap.fancybox-extra-services .card {
|
||||
width: 650px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.fancybox-wrap.fancybox-extra-services .fancybox-close {
|
||||
background: none;
|
||||
top: 12px;
|
||||
right: 12px;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.fancybox-wrap.fancybox-extra-services .fancybox-close:after {
|
||||
content: '\00D7';
|
||||
color: #333;
|
||||
}
|
||||
.fancybox-wrap.fancybox-extra-services .card-body {
|
||||
padding: 0;
|
||||
max-height: 70vh;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.card {
|
||||
padding: 0;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #E5E5E5;
|
||||
background: #FFF;
|
||||
box-shadow: 0px 1px 6px 0px rgba(0, 0, 0, 0.10);
|
||||
color: #333;
|
||||
}
|
||||
.card .card-header {
|
||||
padding: 14px 18px;
|
||||
margin-bottom: 0;
|
||||
border-bottom: 1px solid #E5E5E5;
|
||||
font-size: 19px;
|
||||
font-weight: bold;
|
||||
line-height: 27px;
|
||||
}
|
||||
|
||||
.card.card-toolbar .card-header {
|
||||
padding: 8px 18px;
|
||||
}
|
||||
|
||||
.card .card-subheader {
|
||||
margin-bottom: 0;
|
||||
font-size: 14px;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.card .card-body {
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.card .card-body .card-title {
|
||||
margin: 0;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.card .card-body .card-subtitle {
|
||||
margin: 0;
|
||||
margin-bottom: 8px;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.card .card-body .card-text {
|
||||
font-size: 14px;
|
||||
line-height: 26px;
|
||||
}
|
||||
|
||||
/* card-tabs - start */
|
||||
.card.card-tabs .nav-tabs {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.card.card-tabs .nav-tabs li > a {
|
||||
padding: 0 18px;
|
||||
border: none;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.card.card-tabs .nav-tabs li.active:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 39px;
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: #379aef;
|
||||
}
|
||||
|
||||
.card.card-tabs .tab-content {
|
||||
margin-top: 0;
|
||||
}
|
||||
/* card-tabs - end */
|
||||
|
||||
#rooms_extra_services .nav-tabs {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
#rooms_extra_services .nav-tabs > li {
|
||||
width: 50%;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#rooms_extra_services .nav-tabs > li > a {
|
||||
border: none;
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
#rooms_extra_services .nav-tabs > li.active {
|
||||
border-bottom: 1px solid #1292FF;
|
||||
}
|
||||
|
||||
#rooms_extra_services .nav-tabs > li.active > a {
|
||||
color: #1292FF;
|
||||
}
|
||||
|
||||
#rooms_extra_services .nav-tabs > li:not(.active) {
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
}
|
||||
|
||||
#rooms_extra_services .tab-content {
|
||||
margin-top: 0;
|
||||
padding: 0;
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
||||
#rooms_extra_services .tab-content .rooms_extra_demands_head {
|
||||
padding: 10px 18px;
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
}
|
||||
|
||||
#rooms_extra_services .tab-content .rooms_extra_demands_text {
|
||||
font-size: 12px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#rooms_extra_services .tab-content .room_demands {
|
||||
padding: 0 18px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
|
||||
#rooms_extra_services .tab-content .demand_header {
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
line-height: 24px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
#rooms_extra_services .tab-content .room_demand_detail {
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
margin-top: 0;
|
||||
padding-top: 0;
|
||||
border-top: unset;
|
||||
}
|
||||
|
||||
#rooms_extra_services .tab-content .room_demand_block {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
#rooms_extra_services .tab-content .room_demand_block:not(:last-of-type) {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
#rooms_extra_services .nav-tabs > li.active:after {
|
||||
content: unset;
|
||||
}
|
||||
@@ -114,51 +114,6 @@ $(document).ready(function(){
|
||||
if (e.offsetX >= 16 && e.offsetX <= 39 && e.offsetY >= 16 && e.offsetY <= 34)
|
||||
$(this).fadeOut();
|
||||
});
|
||||
|
||||
$(document).on('click', '.open_rooms_extra_services_panel', function() {
|
||||
var idProduct = $(this).data('id_product');
|
||||
var idOrder = $(this).data('id_order');
|
||||
var dateFrom = $(this).data('date_from');
|
||||
var dateTo = $(this).data('date_to');
|
||||
var action = $(this).data('action');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: {
|
||||
"cache-control": "no-cache"
|
||||
},
|
||||
url: action,
|
||||
dataType: 'json',
|
||||
cache: false,
|
||||
data: {
|
||||
date_from: dateFrom,
|
||||
date_to: dateTo,
|
||||
id_product: idProduct,
|
||||
id_order: idOrder,
|
||||
method: 'getRoomTypeBookingDemands',
|
||||
ajax: true,
|
||||
token: static_token
|
||||
},
|
||||
success: function(result) {
|
||||
if (result.extra_demands) {
|
||||
$('#rooms_extra_services').html('');
|
||||
$('#rooms_extra_services').append(result.extra_demands);
|
||||
}
|
||||
$.fancybox({
|
||||
href: "#rooms_extra_services",
|
||||
autoSize : true,
|
||||
autoScale : true,
|
||||
maxWidth : '100%',
|
||||
'hideOnContentClick': false,
|
||||
afterClose: function() {
|
||||
if (result.reload) {
|
||||
// reload so that changes prices will reflect everywhere
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
@@ -160,65 +160,79 @@ $(document).ready(function(){
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.booking_occupancy_wrapper .submit_occupancy_btn', function(e) {
|
||||
e.preventDefault();
|
||||
if ($('.booking_occupancy_wrapper:visible').length) {
|
||||
return validateBookingOccupancies(e);
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', function(e) {
|
||||
if ($('.booking_occupancy_wrapper:visible').length) {
|
||||
var occupancy_wrapper = $('.booking_occupancy_wrapper:visible');
|
||||
$(occupancy_wrapper).find(".occupancy_info_block").addClass('selected');
|
||||
setRoomTypeGuestOccupancy(occupancy_wrapper);
|
||||
if (!($(e.target).closest(".booking_occupancy_wrapper").length
|
||||
|| $(e.target).closest(".booking_guest_occupancy").length
|
||||
|| $(e.target).closest(".remove-room-link").length
|
||||
)) {
|
||||
let hasErrors = 0;
|
||||
|
||||
let adults = $(occupancy_wrapper).find(".num_adults").map(function(){return $(this).val();}).get();
|
||||
let children = $(occupancy_wrapper).find(".num_children").map(function(){return $(this).val();}).get();
|
||||
let child_ages = $(occupancy_wrapper).find(".guest_child_age").map(function(){return $(this).val();}).get();
|
||||
|
||||
// start validating above values
|
||||
if (!adults.length || (adults.length != children.length)) {
|
||||
hasErrors = 1;
|
||||
showErrorMessage(invalid_occupancy_txt);
|
||||
} else {
|
||||
$(occupancy_wrapper).find('.occupancy_count').removeClass('error_border');
|
||||
|
||||
// validate values of adults and children
|
||||
adults.forEach(function (item, index) {
|
||||
if (isNaN(item) || parseInt(item) < 1) {
|
||||
hasErrors = 1;
|
||||
$(occupancy_wrapper).find(".num_adults").eq(index).closest('.occupancy_count_block').find('.occupancy_count').addClass('error_border');
|
||||
}
|
||||
if (isNaN(children[index])) {
|
||||
hasErrors = 1;
|
||||
$(occupancy_wrapper).find(".num_children").eq(index).closest('.occupancy_count_block').find('.occupancy_count').addClass('error_border');
|
||||
}
|
||||
});
|
||||
|
||||
// validate values of selected child ages
|
||||
$(occupancy_wrapper).find('.guest_child_age').removeClass('error_border');
|
||||
child_ages.forEach(function (age, index) {
|
||||
age = parseInt(age);
|
||||
if (isNaN(age) || (age < 0) || (age >= parseInt(max_child_age))) {
|
||||
hasErrors = 1;
|
||||
$(occupancy_wrapper).find(".guest_child_age").eq(index).addClass('error_border');
|
||||
}
|
||||
});
|
||||
}
|
||||
if (hasErrors == 0) {
|
||||
if (!($(e.target).closest(".ajax_add_to_cart_button").length
|
||||
|| $(e.target).closest(".exclusive.book_now_submit").length
|
||||
)) {
|
||||
$(occupancy_wrapper).parent().removeClass('open');
|
||||
$(occupancy_wrapper).siblings(".booking_guest_occupancy").removeClass('error_border');
|
||||
$(document).trigger( "QloApps:updateRoomOccupancy", [occupancy_wrapper]);
|
||||
}
|
||||
} else {
|
||||
$(occupancy_wrapper).siblings(".booking_guest_occupancy").addClass('error_border');
|
||||
}
|
||||
return validateBookingOccupancies(e);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
function validateBookingOccupancies(e) {
|
||||
var occupancy_wrapper = $('.booking_occupancy_wrapper:visible');
|
||||
$(occupancy_wrapper).find(".occupancy_info_block").addClass('selected');
|
||||
setRoomTypeGuestOccupancy(occupancy_wrapper);
|
||||
let hasErrors = 0;
|
||||
let adults = $(occupancy_wrapper).find(".num_adults").map(function(){return $(this).val();}).get();
|
||||
let children = $(occupancy_wrapper).find(".num_children").map(function(){return $(this).val();}).get();
|
||||
let child_ages = $(occupancy_wrapper).find(".guest_child_age").map(function(){return $(this).val();}).get();
|
||||
|
||||
// start validating above values
|
||||
if (!adults.length || (adults.length != children.length)) {
|
||||
hasErrors = 1;
|
||||
showErrorMessage(invalid_occupancy_txt);
|
||||
} else {
|
||||
$(occupancy_wrapper).find('.occupancy_count').removeClass('error_border');
|
||||
|
||||
// validate values of adults and children
|
||||
adults.forEach(function (item, index) {
|
||||
if (isNaN(item) || parseInt(item) < 1) {
|
||||
hasErrors = 1;
|
||||
$(occupancy_wrapper).find(".num_adults").eq(index).closest('.occupancy_count_block').find('.occupancy_count').addClass('error_border');
|
||||
}
|
||||
if (isNaN(children[index])) {
|
||||
hasErrors = 1;
|
||||
$(occupancy_wrapper).find(".num_children").eq(index).closest('.occupancy_count_block').find('.occupancy_count').addClass('error_border');
|
||||
}
|
||||
});
|
||||
|
||||
// validate values of selected child ages
|
||||
$(occupancy_wrapper).find('.guest_child_age').removeClass('error_border');
|
||||
child_ages.forEach(function (age, index) {
|
||||
age = parseInt(age);
|
||||
if (isNaN(age) || (age < 0) || (age >= parseInt(max_child_age))) {
|
||||
hasErrors = 1;
|
||||
$(occupancy_wrapper).find(".guest_child_age").eq(index).addClass('error_border');
|
||||
}
|
||||
});
|
||||
}
|
||||
if (hasErrors == 0) {
|
||||
if (!($(e.target).closest(".ajax_add_to_cart_button").length
|
||||
|| $(e.target).closest(".exclusive.book_now_submit").length
|
||||
)) {
|
||||
$(occupancy_wrapper).parent().removeClass('open');
|
||||
$(occupancy_wrapper).siblings(".booking_guest_occupancy").removeClass('error_border');
|
||||
$(document).trigger( "QloApps:updateRoomOccupancy", [occupancy_wrapper]);
|
||||
}
|
||||
} else {
|
||||
$(occupancy_wrapper).siblings(".booking_guest_occupancy").addClass('error_border');
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
$(document).on('click', '.booking_occupancy_wrapper .add_new_occupancy_btn', function(e) {
|
||||
e.preventDefault();
|
||||
|
||||
|
||||
73
themes/hotel-reservation-theme/js/order-confirmation.js
Normal file
73
themes/hotel-reservation-theme/js/order-confirmation.js
Normal file
@@ -0,0 +1,73 @@
|
||||
/**
|
||||
* 2010-2022 Webkul.
|
||||
*
|
||||
* NOTICE OF LICENSE
|
||||
*
|
||||
* All right is reserved,
|
||||
* Please go through LICENSE.txt file inside our module
|
||||
*
|
||||
* 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 CustomizationPolicy.txt file inside our module for more information.
|
||||
*
|
||||
* @author Webkul IN
|
||||
* @copyright 2010-2022 Webkul IN
|
||||
* @license LICENSE.txt
|
||||
*/
|
||||
|
||||
$(document).ready(function(){
|
||||
$(document).on('click', '.open_rooms_extra_services_panel', function(e) {
|
||||
var idProduct = $(this).data('id_product');
|
||||
var idOrder = $(this).data('id_order');
|
||||
var dateFrom = $(this).data('date_from');
|
||||
var dateTo = $(this).data('date_to');
|
||||
var action = $(this).data('action');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: {
|
||||
"cache-control": "no-cache"
|
||||
},
|
||||
url: action,
|
||||
dataType: 'json',
|
||||
cache: false,
|
||||
data: {
|
||||
date_from: dateFrom,
|
||||
date_to: dateTo,
|
||||
id_product: idProduct,
|
||||
id_order: idOrder,
|
||||
action: 'getRoomTypeBookingDemands',
|
||||
method: 'getRoomTypeBookingDemands',
|
||||
ajax: true,
|
||||
token: static_token
|
||||
},
|
||||
success: function(result) {
|
||||
if (result.extra_demands) {
|
||||
$('#rooms_extra_services').html('');
|
||||
$('#rooms_extra_services').append(result.extra_demands);
|
||||
}
|
||||
$.fancybox({
|
||||
href: "#rooms_extra_services",
|
||||
autoSize : true,
|
||||
autoScale : true,
|
||||
maxWidth : '100%',
|
||||
wrapCSS: 'fancybox-extra-services',
|
||||
padding: 0,
|
||||
helpers: {
|
||||
overlay: {
|
||||
css : {background: 'rgba(0, 0, 0, 0.8)'}
|
||||
}
|
||||
},
|
||||
'hideOnContentClick': false,
|
||||
afterClose: function() {
|
||||
if (result.reload) {
|
||||
// reload so that changes prices will reflect everywhere
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
});
|
||||
@@ -546,6 +546,50 @@ $(document).ready(function()
|
||||
}
|
||||
});
|
||||
|
||||
$(document).on('click', '.open_rooms_extra_services_panel', function() {
|
||||
var idOrder = $(this).data('id_order');
|
||||
var dateFrom = $(this).data('date_from');
|
||||
var dateTo = $(this).data('date_to');
|
||||
var action = $(this).data('action');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
headers: {
|
||||
"cache-control": "no-cache"
|
||||
},
|
||||
url: action,
|
||||
dataType: 'json',
|
||||
cache: false,
|
||||
data: {
|
||||
date_from: dateFrom,
|
||||
date_to: dateTo,
|
||||
id_product: idProduct,
|
||||
id_order: idOrder,
|
||||
method: 'getRoomTypeBookingDemands',
|
||||
ajax: true,
|
||||
token: static_token
|
||||
},
|
||||
success: function(result) {
|
||||
if (result.extra_demands) {
|
||||
$('#rooms_extra_services').html('');
|
||||
$('#rooms_extra_services').append(result.extra_demands);
|
||||
}
|
||||
$.fancybox({
|
||||
href: "#rooms_extra_services",
|
||||
autoSize : true,
|
||||
autoScale : true,
|
||||
maxWidth : '100%',
|
||||
'hideOnContentClick': false,
|
||||
afterClose: function() {
|
||||
if (result.reload) {
|
||||
// reload so that changes prices will reflect everywhere
|
||||
location.reload();
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
});
|
||||
});
|
||||
|
||||
function updateServiceProducts(element)
|
||||
{
|
||||
var operator = $(element).is(':checked') ? 'up' : 'down';
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
<p class="text-center">
|
||||
|
||||
{if (isset($rm_v['extra_demands']) && $rm_v['extra_demands']) || isset($rm_v['additional_services']) && $rm_v['additional_services']}
|
||||
<a data-date_from="{$rm_v['data_form']}" data-date_to="{$rm_v['data_to']}" data-id_product="{$data_v['id_product']}" data-id_order="{$order->id}" data-action="{$link->getPageLink('order-detail')}" class="open_rooms_extra_services_panel" href="#rooms_type_extra_services_form">
|
||||
<a data-date_from="{$rm_v['data_form']}" data-date_to="{$rm_v['data_to']}" data-id_product="{$data_v['id_product']}" data-id_order="{$data_v['id_order']}" data-action="{$link->getPageLink('order-detail')}" class="open_rooms_extra_services_panel" href="#rooms_type_extra_services_form">
|
||||
{/if}
|
||||
{if $group_use_tax}
|
||||
{displayWtPriceWithCurrency price=($rm_v['extra_demands_price_ti'] + $rm_v['additional_services_price_ti']) currency=$objOrderCurrency}
|
||||
|
||||
Reference in New Issue
Block a user