diff --git a/admin/themes/default/sass/admin-theme_rtl.sass b/admin/themes/default/sass/admin-theme_rtl.sass index 90d7eec1b..712d08aa9 100644 --- a/admin/themes/default/sass/admin-theme_rtl.sass +++ b/admin/themes/default/sass/admin-theme_rtl.sass @@ -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" diff --git a/admin/themes/default/sass/controllers/_modules_catalog.sass b/admin/themes/default/sass/controllers/_modules_catalog.sass index 67c7b45f4..74a40fc8f 100644 --- a/admin/themes/default/sass/controllers/_modules_catalog.sass +++ b/admin/themes/default/sass/controllers/_modules_catalog.sass @@ -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 diff --git a/admin/themes/default/sass/partials/_kpi.sass b/admin/themes/default/sass/partials/_kpi.sass index 78df786ff..e6ccfe8cb 100644 --- a/admin/themes/default/sass/partials/_kpi.sass +++ b/admin/themes/default/sass/partials/_kpi.sass @@ -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 diff --git a/admin/themes/default/sass/partials/_rtl.sass b/admin/themes/default/sass/partials/_rtl.sass index c3b7b569f..7fd16f206 100644 --- a/admin/themes/default/sass/partials/_rtl.sass +++ b/admin/themes/default/sass/partials/_rtl.sass @@ -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 diff --git a/admin/themes/default/sass/partials/_tree.sass b/admin/themes/default/sass/partials/_tree.sass index b6cb0ecdf..897c29f85 100644 --- a/admin/themes/default/sass/partials/_tree.sass +++ b/admin/themes/default/sass/partials/_tree.sass @@ -62,4 +62,8 @@ .tree-panel-label-title font-weight: 400 margin: 0 - @include padding(0, 0, 0, 8px) \ No newline at end of file + @include padding(0, 0, 0, 8px) + +.tree.cattree + max-height: 350px + overflow-y: auto diff --git a/admin/themes/default/sass/vendor/bootstrap-rtl-sass/_button-groups-rtl.sass b/admin/themes/default/sass/vendor/bootstrap-rtl-sass/_button-groups-rtl.sass index 052bd3634..52404f5f6 100644 --- a/admin/themes/default/sass/vendor/bootstrap-rtl-sass/_button-groups-rtl.sass +++ b/admin/themes/default/sass/vendor/bootstrap-rtl-sass/_button-groups-rtl.sass @@ -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, diff --git a/admin/themes/default/sass/vendor/bootstrap-rtl-sass/_grid-rtl.sass b/admin/themes/default/sass/vendor/bootstrap-rtl-sass/_grid-rtl.sass index 4563bca33..c8e9fb9fd 100644 --- a/admin/themes/default/sass/vendor/bootstrap-rtl-sass/_grid-rtl.sass +++ b/admin/themes/default/sass/vendor/bootstrap-rtl-sass/_grid-rtl.sass @@ -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 diff --git a/admin/themes/default/sass/vendor/bootstrap-rtl-sass/_merged-rtl.sass b/admin/themes/default/sass/vendor/bootstrap-rtl-sass/_merged-rtl.sass index 835e73b6f..a302d5d30 100644 --- a/admin/themes/default/sass/vendor/bootstrap-rtl-sass/_merged-rtl.sass +++ b/admin/themes/default/sass/vendor/bootstrap-rtl-sass/_merged-rtl.sass @@ -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 diff --git a/admin/themes/default/template/controllers/modules_catalog/modules_list.tpl b/admin/themes/default/template/controllers/modules_catalog/modules_list.tpl index 22113e45c..02226f20a 100644 --- a/admin/themes/default/template/controllers/modules_catalog/modules_list.tpl +++ b/admin/themes/default/template/controllers/modules_catalog/modules_list.tpl @@ -22,10 +22,12 @@
-
-
auto_add_to_cart && $product->price_addition_type == Product::PRICE_ADDITION_TYPE_WITH_ROOM}style="display:none"{/if}> + {*
auto_add_to_cart && $product->price_addition_type == Product::PRICE_ADDITION_TYPE_WITH_ROOM}style="display:none"{/if}>
{$currency->prefix}{$currency->suffix} @@ -208,7 +208,7 @@ $(document).ready(function () {
{if isset($pack) && $pack->isPack($product->id)}

{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]}

{/if} -
+
*}
";if(!f.monthSelect)return n;var r=!!f.startDate&&Q(f.startDate).add(f.singleMonth||"month2"!==t?0:1,"month"),s=!!f.endDate&&Q(f.endDate).add(f.singleMonth||"month1"!==t?0:-1,"month"),o=r&&e.isSame(r,"year")?r.get("month"):0,i=s&&e.isSame(s,"year")?s.get("month"):11,d=Math.min(o,a),l=Math.max(i,a);if(d===l)return n;return P("month",V({minSelectable:o,maxSelectable:i,minVisible:d,maxVisible:l},a,function(e){return A(e)}))}(e=Q(e).toDate(),t),n=function(e,t){var a=(e=Q(e)).get("year"),n='
'+a+"
";if(!f.yearSelect)return n;var r=f.yearSelect&&"function"==typeof f.yearSelect,s=!!f.startDate&&Q(f.startDate).add(f.singleMonth||"month2"!==t?0:1,"month"),o=!!f.endDate&&Q(f.endDate).add(f.singleMonth||"month1"!==t?0:-1,"month"),i=r?f.yearSelect(a):f.yearSelect.slice(),d=s?Math.max(i[0],s.get("year")):Math.min(i[0],a),l=o?Math.min(i[1],o.get("year")):Math.max(i[1],a),u=Math.min(d,a),m=Math.max(l,a);if(u===m)return n;return P("year",V({minSelectable:d,maxSelectable:l,minVisible:u,maxVisible:m},a))}(e,t);m.find("."+t+" .month-name").html(a+" "+n),m.find("."+t+" tbody").html(function(e){var t=[];e.setDate(1);new Date(e.getTime()-864e5);var a,n,r=new Date,s=e.getDay();0===s&&"monday"===f.startOfWeek&&(s=7);if(0");for(var i=0;i<7;i++){var m="monday"==f.startOfWeek?i+1:i;a=t[7*u+m];var h=Q(a.time).format("L")==Q(r).format("L");if(a.extraClass="",a.tooltip="",a.valid&&f.beforeShowDay&&"function"==typeof f.beforeShowDay){var c=f.beforeShowDay(Q(a.time).toDate());a.valid=c[0],a.extraClass=c[1]||"",a.tooltip=c[2]||"",""!==a.tooltip&&(a.extraClass+=" has-tooltip ")}var p={time:a.time,"data-tooltip":a.tooltip,class:"day "+a.type+" "+a.extraClass+" "+(a.valid?"valid":"invalid")+" "+(h?"real-today":"")};0===i&&f.showWeekNumbers&&l.push('
'+f.getWeekNumber(a.date)+"
"),l.push("
"+J(a.time,a.day)+"
")}l.push("")}return l.join("")}(e)),f[t]=e,w(),m.find(".day").off("click").on("click",function(e){k(U(this))}),m.find(".day").off("mouseenter").on("mouseenter",function(e){y(U(this))}),m.find(".day").off("mouseleave").on("mouseleave",function(e){m.find(".date-range-length-tip").hide(),f.singleDate&&b()}),m.find(".week-number").off("click").on("click",function(e){var t,a,n,r;t=U(this),r=parseInt(t.attr("data-start-time"),10),f.startWeek?(m.find(".week-number-selected").removeClass("week-number-selected"),a=new Date(re.maxSelectable});return n}function P(e,t){for(var a,n='
"+a+"
"}function Y(e,t){m.find("."+t).append("
"+K("Time")+': 00:00
'),u(t,e)}function A(e){return K("month-name")[e]}function W(e){return Q(e).format(f.format)}function I(){C();var e=parseInt(Q(f.month1).format("YYYYMM")),t=parseInt(Q(f.month2).format("YYYYMM")),a=Math.abs(e-t);1"+K("week-number")+"":"";return"monday"==f.startOfWeek?e+""+K("week-1")+""+K("week-2")+""+K("week-3")+""+K("week-4")+""+K("week-5")+""+K("week-6")+""+K("week-7")+"":e+""+K("week-7")+""+K("week-1")+""+K("week-2")+""+K("week-3")+""+K("week-4")+""+K("week-5")+""+K("week-6")+""}function q(e){return e=Q(e),!(!f.startDate||!e.endOf("month").isBefore(f.startDate))||!(!f.endDate||!e.startOf("month").isAfter(f.endDate))}function $(e,t,r){var s=U.extend(!0,{},e);U.each(t,function(e,t){var a=t(r);for(var n in a)s.hasOwnProperty(n)?s[n]+=a[n]:s[n]=a[n]});var a="";for(var n in s)s.hasOwnProperty(n)&&(a+=n+'="'+s[n]+'" ');return a}function J(e,t){return f.showDateFilter&&"function"==typeof f.showDateFilter?f.showDateFilter(e,t):t}function K(e){var t=e.toLowerCase(),a=e in r?r[e]:t in r?r[t]:null,n=U.dateRangePickerLanguages.default;return null==a&&(a=e in n?n[e]:t in n?n[t]:""),a}function _(){var e=f.defaultTime?f.defaultTime:new Date;return f.lookBehind?(f.startDate&&L(e,f.startDate)<0&&(e=F(Q(f.startDate).toDate())),f.endDate&&0'+c.customTopBar+"
"):(e+='
'+W("selected")+' ...',c.singleDate||(e+=' '+c.separator+' ... (3 '+W("days")+")"),e+='
error
default
'),e=e+('
');var t=c.showWeekNumbers?6:5,a="<";c.customArrowPrevSymbol&&(a=c.customArrowPrevSymbol);var n,s=">";c.customArrowNextSymbol&&(s=c.customArrowNextSymbol);e+='
'+$()+"
'+a+' '+(c.singleDate||!c.stickyMonths?''+s+"":"")+'
",c.singleMonth||(e+='
'+function(){for(var e=['
'],t=0;t<20;t++)e.push('
');return e.push("
"),e.join("")}()+'
'+$()+"
'+(c.stickyMonths?"":''+a+"")+' '+s+'
");e+='
',c.singleDate||(e+='
');if(e+='
")}().hide()).append('
'),Z(c.container).append(l),c.inline?l.addClass("inline-wrapper"):i(),c.alwaysOpen&&l.find(".apply-btn").hide(),t=K(),_(t),c.time.enabled&&(c.startDate&&c.endDate||c.start&&c.end?(z(U(c.start||c.startDate).toDate(),"time1"),z(U(c.end||c.endDate).toDate(),"time2")):(e=c.defaultEndTime||t,z(t,"time1"),z(e,"time2"))),t="",t=c.singleDate?W("default-single"):c.minDays&&c.maxDays?W("default-range"):c.minDays?W("default-more"):c.maxDays?W("default-less"):W("default-default"),l.find(".default-top").html(t.replace(/\%d/,c.minDays).replace(/\%d/,c.maxDays)),c.singleMonth?l.addClass("single-month"):l.addClass("two-months"),setTimeout(function(){u(),n=!0},0),l.on("click",function(e){e.stopPropagation()}),Z(document).on("click.datepicker",G),l.find(".next").on("click",function(){var e,t;c.stickyMonths?(e=P(c.month1),A(t=P(c.month2))||!c.singleDate&&0<=O(e,t)||(S(e,"month1"),S(t,"month2"),M())):(e=Z(e=this).parents("table").hasClass("month2"),t=P(t=e?c.month2:c.month1),!c.singleMonth&&!c.singleDate&&!e&&0<=O(t,c.month2)||A(t)||(S(t,e?"month2":"month1"),C()))}),l.find(".prev").on("click",function(){var e,t;c.stickyMonths?(t=Y(c.month1),e=Y(c.month2),A(t)||!c.singleDate&&O(e,t)<=0||(S(e,"month2"),S(t,"month1"),M())):(e=Z(e=this).parents("table").hasClass("month2"),t=Y(t=e?c.month2:c.month1),e&&O(t,c.month1)<=0||A(t)||(S(t,e?"month2":"month1"),C()))}),l.attr("unselectable","on").css("user-select","none").on("selectstart",function(e){return e.preventDefault(),!1}),l.find(".apply-btn").on("click",function(){T();var e=j(new Date(c.start))+c.separator+j(new Date(c.end));Z(a).trigger("datepicker-apply",{value:e,date1:new Date(c.start),date2:new Date(c.end)})}),l.find("[custom]").on("click",function(){var e=Z(this).attr("custom");c.start=!1,c.end=!1,l.find(".day.checked").removeClass("checked"),c.setValue.call(o,e),y(),b(!0),M(),c.autoClose&&T()}),l.find("[shortcut]").on("click",function(){var e=Z(this).attr("shortcut"),t=new Date,a=!1;if(-1!=e.indexOf("day"))var n=parseInt(e.split(",",2)[1],10),a=new Date((new Date).getTime()+864e5*n),t=new Date(t.getTime()+864e5*(0c.end&&(t=c.end,c.end=v(c.start),c.start=f(t),c.time.enabled)&&c.swapTime&&(m("time1",c.start),m("time2",c.end)),c.start=parseInt(c.start),c.end=parseInt(c.end),N(),c.start&&!c.end&&(Z(r).trigger("datepicker-first-date-selected",{date1:new Date(c.start)}),B(e)),g(),y(),b(),M(),w())}function k(e){if(e=parseInt(e,10),c.startDate&&V(e,c.startDate)<0)return!1;if(c.endDate&&0c.maxDays)return!1;if(0c.start)return!1;if(c.beforeShowDay&&"function"==typeof c.beforeShowDay){for(var t=!0,a=e;1c.start&&(a-=864e5),a'+e.attr("data-tooltip")+"":e.hasClass("invalid")||(c.singleDate?(l.find(".day.hovering").removeClass("hovering"),e.addClass("hovering")):(l.find(".day").each(function(){var e=parseInt(Z(this).attr("time"));c.start,c.end;e==o?Z(this).addClass("hovering"):Z(this).removeClass("hovering"),c.start&&!c.end&&(c.starte&&o<=e)?Z(this).addClass("hovering"):Z(this).removeClass("hovering")}),c.start&&!c.end&&(s=D(o,c.start),c.hoveringTooltip)&&("function"==typeof c.hoveringTooltip?i=c.hoveringTooltip(s,c.start,o):!0===c.hoveringTooltip&&1c.maxDays?(c.start=!1,c.end=!1,l.find(".day").removeClass("checked"),l.find(".drp_top-bar").removeClass("normal").addClass("error").find(".error-top").html(W("less-than").replace("%d",c.maxDays))):c.minDays&&et.getTime()&&(n=t,t=e,e=n,n=null);var n=!0;c.startDate&&V(e,c.startDate)<0&&(n=!1),((n=!(c.endDate&&0'+q(s)+"";var a,n,s,r,o,i=c.monthSelect&&(i=!!c.startDate&&U(c.startDate).add(c.singleMonth||"month2"!==a?0:1,"month"),a=!!c.endDate&&U(c.endDate).add(c.singleMonth||"month1"!==a?0:-1,"month"),i=i&&n.isSame(i,"year")?i.get("month"):0,n=a&&n.isSame(a,"year")?a.get("month"):11,a=Math.min(i,s),o=Math.max(n,s),a!==o)?R("month",F({minSelectable:i,maxSelectable:n,minVisible:a,maxVisible:o},s,q)):d,d=(n=t,a=(a=U(a=e)).get("year"),o='
'+a+"
",c.yearSelect&&(s=c.yearSelect&&"function"==typeof c.yearSelect,d=!!c.startDate&&U(c.startDate).add(c.singleMonth||"month2"!==n?0:1,"month"),n=!!c.endDate&&U(c.endDate).add(c.singleMonth||"month1"!==n?0:-1,"month"),s=s?c.yearSelect(a):c.yearSelect.slice(),d=d?Math.max(s[0],d.get("year")):Math.min(s[0],a),n=n?Math.min(s[1],n.get("year")):Math.max(s[1],a),s=Math.min(d,a),r=Math.max(n,a),s!==r)?R("year",F({minSelectable:d,maxSelectable:n,minVisible:s,maxVisible:r},a)):o);l.find("."+t+" .month-name").html(i+" "+d),l.find("."+t+" tbody").html(function(e){var t,a,n=[],s=(e.setDate(1),new Date(e.getTime()-864e5),new Date),r=e.getDay();0===r&&"monday"===c.startOfWeek&&(r=7);if(0");for(i=0;i<7;i++){var m="monday"==c.startOfWeek?i+1:i,m=U((t=n[7*u+m]).time).format("L")==U(s).format("L"),h=(t.extraClass="",t.tooltip="",t.valid&&c.beforeShowDay&&"function"==typeof c.beforeShowDay&&(h=c.beforeShowDay(U(t.time).toDate()),t.valid=h[0],t.extraClass=h[1]||"",t.tooltip=h[2]||"",""!==t.tooltip)&&(t.extraClass+=" has-tooltip "),{time:t.time,"data-tooltip":t.tooltip,class:"day "+t.type+" "+t.extraClass+" "+(t.valid?"valid":"invalid")+" "+(m?"real-today":"")});0===i&&c.showWeekNumbers&&l.push('
'+c.getWeekNumber(t.date)+"
"),l.push("
"+function(e,t){return c.showDateFilter&&"function"==typeof c.showDateFilter?c.showDateFilter(e,t):t}(t.time,t.day)+"
")}l.push("")}return l.join("")}(e)),c[t]=e,g(),l.find(".day").off("click").on("click",function(e){I(Z(this))}),l.find(".day").off("mouseenter").on("mouseenter",function(e){B(Z(this))}),l.find(".day").off("mouseleave").on("mouseleave",function(e){l.find(".date-range-length-tip").hide(),c.singleDate&&N()}),l.find(".week-number").off("click").on("click",function(e){var t,a,n,s;t=Z(this),s=parseInt(t.attr("data-start-time"),10),c.startWeek?(l.find(".week-number-selected").removeClass("week-number-selected"),a=new Date(se.maxSelectable});return n}function R(e,t){for(var a,n='
"+a+"
"}function z(e,t){l.find("."+t).append("
"+W("Time")+': 00:00
'),m(t,e)}function q(e){return W("month-name")[e]}function j(e){return U(e).format(c.format)}function C(){M();var e=parseInt(U(c.month1).format("YYYYMM")),t=parseInt(U(c.month2).format("YYYYMM")),e=Math.abs(e-t),t=(1"+W("week-number")+"":"";return"monday"==c.startOfWeek?e+""+W("week-1")+""+W("week-2")+""+W("week-3")+""+W("week-4")+""+W("week-5")+""+W("week-6")+""+W("week-7")+"":e+""+W("week-7")+""+W("week-1")+""+W("week-2")+""+W("week-3")+""+W("week-4")+""+W("week-5")+""+W("week-6")+""}function A(e){return e=U(e),c.startDate&&e.endOf("month").isBefore(c.startDate)||!(!c.endDate||!e.startOf("month").isAfter(c.endDate))}function J(e,t,s){var a,r=Z.extend(!0,{},e),n=(Z.each(t,function(e,t){var a,n=t(s);for(a in n)r.hasOwnProperty(a)?r[a]+=n[a]:r[a]=n[a]}),"");for(a in r)r.hasOwnProperty(a)&&(n+=a+'="'+r[a]+'" ');return n}function W(e){var t=e.toLowerCase(),a=e in s?s[e]:t in s?s[t]:null,n=Z.dateRangePickerLanguages.default;return a=null==a?e in n?n[e]:t in n?n[t]:"":a}function K(){var e=c.defaultTime||new Date;return c.lookBehind?(c.startDate&&O(e,c.startDate)<0&&(e=P(U(c.startDate).toDate())),c.endDate&&0 0 ? deci_string : '00'); + return abs_val_string + virgule + deci_string; } function formatCurrency(price, currencyFormat, currencySign, currencyBlank) diff --git a/modules/blocknewsletter/blocknewsletter.php b/modules/blocknewsletter/blocknewsletter.php index a7a0612d6..b2a0025d7 100644 --- a/modules/blocknewsletter/blocknewsletter.php +++ b/modules/blocknewsletter/blocknewsletter.php @@ -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'])) { diff --git a/modules/dashactivity/dashactivity.php b/modules/dashactivity/dashactivity.php index df63c4b60..46fc8c72f 100644 --- a/modules/dashactivity/dashactivity.php +++ b/modules/dashactivity/dashactivity.php @@ -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) ); diff --git a/modules/dashactivity/views/css/dashactivity.css b/modules/dashactivity/views/css/dashactivity.css index 960bd1138..d07f1b9cd 100644 --- a/modules/dashactivity/views/css/dashactivity.css +++ b/modules/dashactivity/views/css/dashactivity.css @@ -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; diff --git a/modules/dashactivity/views/templates/hook/dashboard_zone_one.tpl b/modules/dashactivity/views/templates/hook/dashboard_zone_one.tpl index 95cee2cd3..900c3f64f 100644 --- a/modules/dashactivity/views/templates/hook/dashboard_zone_one.tpl +++ b/modules/dashactivity/views/templates/hook/dashboard_zone_one.tpl @@ -41,34 +41,35 @@
- +
{l s="Online Visitors" mod='dashactivity'} - - +
+ + {l s="in the last %d minutes" sprintf=$DASHACTIVITY_VISITOR_ONLINE|intval mod='dashactivity'} + +
+
+
- -
- - {l s="in the last %d minutes" sprintf=$DASHACTIVITY_VISITOR_ONLINE|intval mod='dashactivity'} -
- +
{l s="Active Booking Carts" mod='dashactivity'} - - +
+ + {l s="in the last %d minutes" sprintf=$DASHACTIVITY_CART_ACTIVE|intval mod='dashactivity'} + +
+
+ +
- -
- - {l s="in the last %d minutes" sprintf=$DASHACTIVITY_CART_ACTIVE|intval mod='dashactivity'} -
diff --git a/modules/dashoccupancy/views/css/dashoccupancy.css b/modules/dashoccupancy/views/css/dashoccupancy.css index 43b2faf90..711279a60 100644 --- a/modules/dashoccupancy/views/css/dashoccupancy.css +++ b/modules/dashoccupancy/views/css/dashoccupancy.css @@ -41,7 +41,7 @@ top: -50px; bottom: 50px; left: -50px; - right: 50px; + right: -50px; width: calc(100% + 100px); height: calc(100% + 100px); } diff --git a/modules/graphnvd3/graphnvd3.php b/modules/graphnvd3/graphnvd3.php index 7dcc9c4be..f2439f53b 100644 --- a/modules/graphnvd3/graphnvd3.php +++ b/modules/graphnvd3/graphnvd3.php @@ -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 ' diff --git a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl index 7559ca121..579eb756a 100644 --- a/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl +++ b/modules/hotelreservationsystem/views/templates/admin/hotel_rooms_booking/helpers/view/_partials/booking-rooms.tpl @@ -50,7 +50,7 @@ {$allotment_type.name|escape:'htmlall':'UTF-8'} {/foreach} - + {if $occupancy_required_for_booking} @@ -138,7 +138,7 @@ {$allotment_type.name|escape:'htmlall':'UTF-8'} {/foreach} - + {if $occupancy_required_for_booking} diff --git a/modules/qlostatsserviceproducts/qlostatsserviceproducts.php b/modules/qlostatsserviceproducts/qlostatsserviceproducts.php index 4644d0828..07ff01608 100644 --- a/modules/qlostatsserviceproducts/qlostatsserviceproducts.php +++ b/modules/qlostatsserviceproducts/qlostatsserviceproducts.php @@ -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')) { diff --git a/modules/statsbestcategories/statsbestcategories.php b/modules/statsbestcategories/statsbestcategories.php index ffcc16459..1ec55aa3c 100644 --- a/modules/statsbestcategories/statsbestcategories.php +++ b/modules/statsbestcategories/statsbestcategories.php @@ -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, ( diff --git a/modules/statsbestproducts/statsbestproducts.php b/modules/statsbestproducts/statsbestproducts.php index 29459c0d7..537e63f1a 100644 --- a/modules/statsbestproducts/statsbestproducts.php +++ b/modules/statsbestproducts/statsbestproducts.php @@ -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'] = ''.$value['roomTypeName'].''; $value['hotelName'] = ''.$value['hotelName'].''; + if ($value['active']) { + $value['active'] = ''.$this->l('Yes').''; + } else { + $value['active'] = ''.$this->l('No').''; + } } $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'] = ''.$this->l('Yes').''; - } else { - $value['active'] = ''.$this->l('No').''; - } } $this->_values = $values; diff --git a/modules/statsforecast/statsforecast.php b/modules/statsforecast/statsforecast.php index ae5517c32..31cf12d7f 100644 --- a/modules/statsforecast/statsforecast.php +++ b/modules/statsforecast/statsforecast.php @@ -461,7 +461,7 @@ class StatsForecast extends Module '.(int)$payment['nb'].' '.Tools::displayPrice($payment['total'], $currency).' '.sprintf('%0.2f', ($ca['ventil']['nb'] ? ($payment['nb'] / $ca['ventil']['nb']) * 100 : 0)).'% - '.sprintf('%0.2f', ($ca['ventil']['nb'] ? ($payment['total'] / $ca['ventil']['total_incl']) * 100 : 0)).'% + '.sprintf('%0.2f', ($ca['ventil']['total_incl'] > 0 ? ($payment['total'] / $ca['ventil']['total_incl']) * 100 : 0)).'% '.Tools::displayPrice($payment['total'] / (int)$payment['nb'], $currency).' '; } @@ -492,7 +492,7 @@ class StatsForecast extends Module '.$ophone.' '.Tools::displayPrice($amount, $currency).' - '.sprintf('%0.2f', ($ca['ventil']['total'] ? ($amount / $ca['ventil']['total']) * 100 : 0)).'% + '.sprintf('%0.2f', ($ca['ventil']['total'] > 0 ? ($amount / $ca['ventil']['total']) * 100 : 0)).'% '; } } else { @@ -526,7 +526,7 @@ class StatsForecast extends Module '.(int)($zone['nb']).' '.Tools::displayPrice($zone['total'], $currency).' '.sprintf('%0.2f', $ca['ventil']['nb'] ? ($zone['nb'] / $ca['ventil']['nb']) * 100 : 0).'% - '.sprintf('%0.2f', $ca['ventil']['total'] ? ($zone['total'] / $ca['ventil']['total']) * 100 : 0).'% + '.sprintf('%0.2f', $ca['ventil']['total'] > 0 ? ($zone['total'] / $ca['ventil']['total']) * 100 : 0).'% '; } } else { @@ -577,7 +577,7 @@ class StatsForecast extends Module '.(int)($currency_row['nb']).' '.Tools::displayPrice($currency_row['total'], $currency).' '.sprintf('%0.2f', $ca['ventil']['nb'] ? ($currency_row['nb'] / $ca['ventil']['nb']) * 100 : 0).'% - '.sprintf('%0.2f', $ca['ventil']['total'] ? ($currency_row['total'] / $ca['ventil']['total']) * 100 : 0).'% + '.sprintf('%0.2f', $ca['ventil']['total'] > 0 ? ($currency_row['total'] / $ca['ventil']['total']) * 100 : 0).'% '; } } 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); diff --git a/modules/statspersonalinfos/statspersonalinfos.php b/modules/statspersonalinfos/statspersonalinfos.php index 045ac0f4e..a0e30f0d6 100644 --- a/modules/statspersonalinfos/statspersonalinfos.php +++ b/modules/statspersonalinfos/statspersonalinfos.php @@ -116,7 +116,8 @@ class StatsPersonalInfos extends ModuleGraph
'.$this->engine(array( 'type' => 'pie', - 'option' => 'gender' + 'option' => 'gender', + 'format' => 'd' )).'
@@ -133,7 +134,8 @@ class StatsPersonalInfos extends ModuleGraph
'.$this->engine(array( 'type' => 'pie', - 'option' => 'age' + 'option' => 'age', + 'format' => 'd' )).'
@@ -150,7 +152,8 @@ class StatsPersonalInfos extends ModuleGraph
'.$this->engine(array( 'type' => 'pie', - 'option' => 'country' + 'option' => 'country', + 'format' => 'd' )).'
@@ -167,7 +170,8 @@ class StatsPersonalInfos extends ModuleGraph
'.$this->engine(array( 'type' => 'pie', - 'option' => 'currency' + 'option' => 'currency', + 'format' => 'd' )).'
diff --git a/modules/statsproduct/statsproduct.php b/modules/statsproduct/statsproduct.php index c6dd7f867..8a7051421 100644 --- a/modules/statsproduct/statsproduct.php +++ b/modules/statsproduct/statsproduct.php @@ -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 '.$sale['firstname'].' '.$sale['lastname'].' (#'.(int) $sale['id_customer'].')'.' '.($has_attribute ? ''.$sale['product_name'].'' : '').' '.(int)$sale['total_booked'].' - '.Tools::displayprice($sale['total'], $currency).' + '.Tools::displayprice($sale['total'], (int)$sale['id_currency']).' '; } $this->html .= ' @@ -332,7 +334,7 @@ class StatsProduct extends ModuleGraph $this->html .= ' - + '.$this->l('CSV Export').' '; } @@ -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'; diff --git a/modules/statssales/statssales.php b/modules/statssales/statssales.php index cda0279cb..264ddc207 100644 --- a/modules/statssales/statssales.php +++ b/modules/statssales/statssales.php @@ -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.')).'
diff --git a/modules/wkroomsearchblock/views/css/wk-global-search.css b/modules/wkroomsearchblock/views/css/wk-global-search.css index 89acdfa75..3949a7c10 100644 --- a/modules/wkroomsearchblock/views/css/wk-global-search.css +++ b/modules/wkroomsearchblock/views/css/wk-global-search.css @@ -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%; } diff --git a/modules/wkroomsearchblock/views/js/wk-room-search-block.js b/modules/wkroomsearchblock/views/js/wk-room-search-block.js index f0c1d2dba..f1d3b4a54 100644 --- a/modules/wkroomsearchblock/views/js/wk-room-search-block.js +++ b/modules/wkroomsearchblock/views/js/wk-room-search-block.js @@ -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; diff --git a/modules/wkroomsearchblock/views/templates/hook/searchForm.tpl b/modules/wkroomsearchblock/views/templates/hook/searchForm.tpl index 1703b29bf..8bd27f7fc 100644 --- a/modules/wkroomsearchblock/views/templates/hook/searchForm.tpl +++ b/modules/wkroomsearchblock/views/templates/hook/searchForm.tpl @@ -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 +* @copyright since 2010 Webkul IN +* @license https://store.webkul.com/license.html +*} +
{if isset($location_enabled) && $location_enabled}
@@ -191,8 +210,13 @@
{/if}
-
diff --git a/themes/hotel-reservation-theme/_partials/occupancy_field.tpl b/themes/hotel-reservation-theme/_partials/occupancy_field.tpl index c16039713..3717949b3 100644 --- a/themes/hotel-reservation-theme/_partials/occupancy_field.tpl +++ b/themes/hotel-reservation-theme/_partials/occupancy_field.tpl @@ -175,11 +175,16 @@
{/if}
- \ No newline at end of file diff --git a/themes/hotel-reservation-theme/css/order-confirmation.css b/themes/hotel-reservation-theme/css/order-confirmation.css new file mode 100644 index 000000000..654658b95 --- /dev/null +++ b/themes/hotel-reservation-theme/css/order-confirmation.css @@ -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; +} \ No newline at end of file diff --git a/themes/hotel-reservation-theme/js/global.js b/themes/hotel-reservation-theme/js/global.js index 2dc525720..ff00f02c0 100644 --- a/themes/hotel-reservation-theme/js/global.js +++ b/themes/hotel-reservation-theme/js/global.js @@ -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(); - } - }, - }); - }, - }); - }); }); diff --git a/themes/hotel-reservation-theme/js/occupancy.js b/themes/hotel-reservation-theme/js/occupancy.js index 7aba90111..031a37904 100644 --- a/themes/hotel-reservation-theme/js/occupancy.js +++ b/themes/hotel-reservation-theme/js/occupancy.js @@ -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(); diff --git a/themes/hotel-reservation-theme/js/order-confirmation.js b/themes/hotel-reservation-theme/js/order-confirmation.js new file mode 100644 index 000000000..87175d20f --- /dev/null +++ b/themes/hotel-reservation-theme/js/order-confirmation.js @@ -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(); + } + }, + }); + }, + }); + }); +}); \ No newline at end of file diff --git a/themes/hotel-reservation-theme/js/order-opc.js b/themes/hotel-reservation-theme/js/order-opc.js index 4bb396e95..7906974a8 100644 --- a/themes/hotel-reservation-theme/js/order-opc.js +++ b/themes/hotel-reservation-theme/js/order-opc.js @@ -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'; diff --git a/themes/hotel-reservation-theme/order-confirmation.tpl b/themes/hotel-reservation-theme/order-confirmation.tpl index fcbe91d71..f1da8db68 100644 --- a/themes/hotel-reservation-theme/order-confirmation.tpl +++ b/themes/hotel-reservation-theme/order-confirmation.tpl @@ -111,7 +111,7 @@

{if (isset($rm_v['extra_demands']) && $rm_v['extra_demands']) || isset($rm_v['additional_services']) && $rm_v['additional_services']} - + {/if} {if $group_use_tax} {displayWtPriceWithCurrency price=($rm_v['extra_demands_price_ti'] + $rm_v['additional_services_price_ti']) currency=$objOrderCurrency}