Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -4,9 +4,6 @@
|
||||
@import "admin-theme/_bootstrap-init"
|
||||
@import "admin-theme/_font-awesome"
|
||||
|
||||
|
||||
@import url(http://fonts.googleapis.com/css?family=Josefin+Sans:200,400,700)
|
||||
|
||||
html, body
|
||||
min-height: 100%
|
||||
height: 100%
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
.row-padding-top
|
||||
padding-top: 15px
|
||||
|
||||
.thumbnail
|
||||
.thumbnail, .img-thumbnail
|
||||
background-color: white
|
||||
border-color: #ccc!important
|
||||
|
||||
|
||||
@@ -7,7 +7,6 @@ $color-calendar-day: $color-bright
|
||||
|
||||
$color-calendar-outrange: #ccc
|
||||
|
||||
|
||||
$color-calendar-day-selected: $color-calendar
|
||||
$color-calendar-day-selected-compare: $color-calendar-compare
|
||||
|
||||
@@ -81,20 +80,16 @@ $color-calendar-range-compare: lighten($color-calendar-compare,10%)
|
||||
margin: 0
|
||||
border-spacing: 1px
|
||||
thead
|
||||
tr th:after
|
||||
content: ""
|
||||
border-top: 1px solid darken($color-calendar,10%)
|
||||
width: 100%
|
||||
display: block
|
||||
tr th
|
||||
background-color: darken($color-calendar,5%)
|
||||
color: darken($color-calendar,25%)
|
||||
color: white
|
||||
font-size: 0.7em
|
||||
font-weight: 700
|
||||
border-bottom: solid 1px lighten($color-calendar,7%)
|
||||
height: 1.5em
|
||||
text-transform: uppercase
|
||||
|
||||
tr:first-child th
|
||||
background-color: $color-bright
|
||||
border-bottom: 1px solid darken($color-calendar,5%)
|
||||
font-weight: 200
|
||||
font-size: 1.4em
|
||||
color: $color-calendar-day-selected
|
||||
@@ -102,10 +97,15 @@ $color-calendar-range-compare: lighten($color-calendar-compare,10%)
|
||||
text-align: center
|
||||
padding: 0
|
||||
position: relative
|
||||
tr
|
||||
border-bottom: solid 1px white
|
||||
td
|
||||
color: $color-calendar-day-selected
|
||||
height: 2.4em
|
||||
padding: 0 8px
|
||||
@include transition-property(all)
|
||||
@include transition-duration(0.2s)
|
||||
@include transition-timing-function(ease-out)
|
||||
&.day:after
|
||||
content: ""
|
||||
position: absolute
|
||||
@@ -205,6 +205,7 @@ $color-calendar-range-compare: lighten($color-calendar-compare,10%)
|
||||
text-transform: uppercase
|
||||
cursor: pointer
|
||||
&:hover
|
||||
color: white
|
||||
background-color: $color-calendar-day-selected
|
||||
&.active
|
||||
background-color: $color-calendar-day-selected
|
||||
@@ -212,10 +213,19 @@ $color-calendar-range-compare: lighten($color-calendar-compare,10%)
|
||||
&.old
|
||||
color: $color-calendar-outrange
|
||||
th
|
||||
&.switch
|
||||
width: 145px
|
||||
&.next, &.prev
|
||||
&.next
|
||||
text-align: right
|
||||
padding: 0 10px 0 0
|
||||
&.prev
|
||||
text-align: left
|
||||
padding: 0 0 0 10px
|
||||
&.next, &.prev, &.month-switch
|
||||
font-size: 1.3em
|
||||
line-height: 2em
|
||||
height: 2em
|
||||
&:hover
|
||||
background-color: darken($color-calendar,5%)
|
||||
color: white
|
||||
thead tr:first-child th
|
||||
cursor: pointer
|
||||
|
||||
|
||||
@@ -67,7 +67,10 @@ textarea:focus, input[type="text"]:focus, input[type="password"]:focus, input[ty
|
||||
.dropdown-menu
|
||||
text-align: left
|
||||
.btn-group-action
|
||||
width: 175px
|
||||
width: 160px
|
||||
float: right
|
||||
.btn-group
|
||||
float: right
|
||||
a
|
||||
text-decoration: none
|
||||
|
||||
|
||||
@@ -6,6 +6,17 @@
|
||||
#header_shopname
|
||||
@extend .navbar-brand
|
||||
font: 300 1.3em/100% $headings-font-family
|
||||
position: relative
|
||||
padding: 0 0 0 45px
|
||||
margin: 0 20px 0 0
|
||||
height: 38px
|
||||
line-height: 38px
|
||||
img
|
||||
position: absolute
|
||||
top: 0
|
||||
left: 0
|
||||
width: 38px
|
||||
height: 38px
|
||||
#header_notifs_icon_wrapper
|
||||
@extend .hidden-xs
|
||||
@extend .nav
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
border: none
|
||||
font-weight: normal
|
||||
vertical-align: top
|
||||
border-bottom: solid 1px darken(#CAE5F4,15%)
|
||||
span.title_box
|
||||
color: black
|
||||
font-size: 1.1em
|
||||
@@ -36,12 +37,6 @@
|
||||
text-align: center
|
||||
td.pointer
|
||||
cursor: pointer
|
||||
tr td:first-child, tr th:first-child
|
||||
border-top-left-radius: 3px
|
||||
border-bottom-left-radius: 3px
|
||||
tr td:last-child,tr th:last-child
|
||||
border-top-right-radius: 3px
|
||||
border-bottom-right-radius: 3px
|
||||
|
||||
tr.filter
|
||||
background-color: lighten(#CAE5F4,5%)
|
||||
|
||||
@@ -1,14 +1,5 @@
|
||||
// //
|
||||
// Variables
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Global values
|
||||
// --------------------------------------------------
|
||||
|
||||
|
||||
// Grays
|
||||
// -------------------------
|
||||
// Font
|
||||
@import url(http://fonts.googleapis.com/css?family=Ubuntu:300|Open+Sans&subset=latin,cyrillic-ext,greek-ext,greek,latin-ext,cyrillic,vietnamese);
|
||||
|
||||
$gray-darker: lighten(#000, 13.5%) ; //#222
|
||||
$gray-dark: lighten(#000, 20%) ; //#333
|
||||
@@ -20,7 +11,6 @@ $gray-lighter: lighten(#000, 93.5%) ; //#eee
|
||||
// -------------------------
|
||||
|
||||
//$brand-primary: #EF1778 ; //moved to admin-theme sass
|
||||
|
||||
$brand-success: #5cb85c ;
|
||||
$brand-warning: #f0ad4e ;
|
||||
$brand-danger: #d9534f ;
|
||||
|
||||
@@ -258,6 +258,7 @@ function setPreviousYear() {
|
||||
$("#date-end-compare").val(endDate.format($("#date-start").data('date-format')));
|
||||
}
|
||||
|
||||
|
||||
$( document ).ready(function() {
|
||||
//Instanciate datepickers
|
||||
datepickerStart = $('.datepicker1').daterangepicker({
|
||||
@@ -321,7 +322,7 @@ $( document ).ready(function() {
|
||||
});
|
||||
|
||||
$('#datepicker-cancel').click(function() {
|
||||
$('#datepicker').slideUp(200);
|
||||
$('#datepicker').addClass('hide');
|
||||
});
|
||||
|
||||
$('#datepicker').show(function() {
|
||||
@@ -375,4 +376,35 @@ $( document ).ready(function() {
|
||||
datepickerStart.setCompare(true);
|
||||
datepickerEnd.setCompare(true);
|
||||
}
|
||||
|
||||
$('#datepickerExpand').on('click',function() {
|
||||
$('#datepicker').removeClass('hide');
|
||||
$('#date-start').focus();
|
||||
});
|
||||
|
||||
$('.submitDateDay').on('click',function(e){
|
||||
e.preventDefault;
|
||||
setDayPeriod();
|
||||
});
|
||||
$('.submitDateMonth').on('click',function(e){
|
||||
e.preventDefault;
|
||||
setMonthPeriod()
|
||||
});
|
||||
$('.submitDateYear').on('click',function(e){
|
||||
e.preventDefault;
|
||||
setYearPeriod();
|
||||
});
|
||||
$('.submitDateDayPrev').on('click',function(e){
|
||||
e.preventDefault;
|
||||
setPreviousDayPeriod();
|
||||
});
|
||||
$('.submitDateMonthPrev').on('click',function(e){
|
||||
e.preventDefault;
|
||||
setPreviousMonthPeriod();
|
||||
});
|
||||
$('.submitDateYearPrev').on('click',function(e){
|
||||
e.preventDefault;
|
||||
setPreviousYearPeriod();
|
||||
});
|
||||
|
||||
});
|
||||
@@ -56,14 +56,11 @@
|
||||
|
||||
this.format = DPGlobal.parseFormat(options.format||this.element.data('date-format')||'Y-m-d');
|
||||
this.picker = $(DPGlobal.template).appendTo(this.element).show()
|
||||
.on({
|
||||
click: $.proxy(this.click, this),
|
||||
mouseover: $.proxy(this.mouseover, this),
|
||||
mouseout: $.proxy(this.mouseout, this)
|
||||
});
|
||||
//click: $.proxy(this.click, this),
|
||||
//focus: $.proxy(this.show, this),
|
||||
//keyup: $.proxy(this.update, this)
|
||||
.on({
|
||||
click: $.proxy(this.click, this),
|
||||
mouseover: $.proxy(this.mouseover, this),
|
||||
mouseout: $.proxy(this.mouseout, this)
|
||||
});
|
||||
|
||||
this.minViewMode = options.minViewMode||this.element.data('date-minviewmode')||0;
|
||||
if (typeof this.minViewMode === 'string') {
|
||||
@@ -227,7 +224,7 @@
|
||||
month = d.getMonth(),
|
||||
currentDate = this.date.valueOf();
|
||||
this.picker.find('.daterangepicker-days th:eq(1)')
|
||||
.text(year+' / '+DPGlobal.dates.months[month]);
|
||||
.text(year+' / '+DPGlobal.dates.months[month]).append(' <small><i class="icon-angle-down"></i><small>');
|
||||
var prevMonth = new Date(year, month-1, 28,0,0,0,0),
|
||||
day = DPGlobal.getDaysInMonth(prevMonth.getFullYear(), prevMonth.getMonth());
|
||||
prevMonth.setDate(day);
|
||||
@@ -236,9 +233,7 @@
|
||||
nextMonth.setDate(nextMonth.getDate() + 42);
|
||||
nextMonth = nextMonth.valueOf();
|
||||
var html = [];
|
||||
var clsName,
|
||||
prevY,
|
||||
prevM;
|
||||
var clsName, prevY, prevM;
|
||||
while(prevMonth.valueOf() < nextMonth) {
|
||||
if (prevMonth.getDay() === this.weekStart) {
|
||||
html.push('<tr>');
|
||||
@@ -251,10 +246,12 @@
|
||||
} else if ((prevM > month && prevY === year) || prevY > year) {
|
||||
clsName += ' new';
|
||||
}
|
||||
// if (prevMonth.valueOf() === currentDate) {
|
||||
// clsName += ' active';
|
||||
// }
|
||||
html.push('<td class="day '+clsName+'" data-val="'+prevMonth.getTime()+'">'+prevMonth.getDate() + '</td>');
|
||||
if (!clsName){
|
||||
html.push('<td class="day" data-val="'+prevMonth.getTime()+'">' + prevMonth.getDate() + '</td>');
|
||||
} else {
|
||||
html.push('<td class="'+clsName+'"></td>');
|
||||
}
|
||||
|
||||
if (prevMonth.getDay() === this.weekEnd) {
|
||||
html.push('</tr>');
|
||||
}
|
||||
@@ -286,46 +283,7 @@
|
||||
}
|
||||
yearCont.html(html);
|
||||
this.updateRange();
|
||||
click = 2;
|
||||
},
|
||||
|
||||
updateRange: function() {
|
||||
$("#datepicker .day").each(function(){
|
||||
var date_val = parseInt($(this).data('val'),10);
|
||||
|
||||
if (end && start)
|
||||
{
|
||||
if(date_val > start && date_val < end) {
|
||||
$(this).not(".old").not(".new").addClass("range");
|
||||
}
|
||||
if(date_val === start) {
|
||||
$(this).not(".old").not(".new").addClass("start-selected");
|
||||
}
|
||||
if(date_val === end) {
|
||||
$(this).not(".old").not(".new").addClass("end-selected");
|
||||
}
|
||||
}
|
||||
|
||||
if (endCompare && startCompare) {
|
||||
$(this).removeClass("range-compare")
|
||||
.removeClass("start-selected-compare")
|
||||
.removeClass("end-selected-compare");
|
||||
|
||||
if(date_val > startCompare && date_val < endCompare) {
|
||||
$(this).not(".old").not(".new").addClass("range-compare");
|
||||
}
|
||||
if(date_val === startCompare) {
|
||||
$(this).not(".old").not(".new").addClass("start-selected-compare");
|
||||
}
|
||||
if(date_val === endCompare) {
|
||||
$(this).not(".old").not(".new").addClass("end-selected-compare");
|
||||
}
|
||||
} else {
|
||||
$(this).not(".old").not(".new").removeClass("range-compare")
|
||||
.removeClass("start-selected-compare")
|
||||
.removeClass("end-selected-compare");
|
||||
}
|
||||
});
|
||||
//click = 2;
|
||||
},
|
||||
|
||||
click: function(e) {
|
||||
@@ -383,20 +341,25 @@
|
||||
|
||||
case 'td':
|
||||
//reset
|
||||
if (target.is('.day') && !target.is('.disabled') && !target.is('.old') && !target.is('.new')){
|
||||
if (target.is('.day') && !target.is('.disabled')){
|
||||
// reset process for a new range
|
||||
if (start && end) {
|
||||
if (!compare) {
|
||||
click = 2 ;
|
||||
$(".range").removeClass('range');
|
||||
$(".start-selected").removeClass("start-selected");
|
||||
$(".end-selected").removeClass("end-selected");
|
||||
}
|
||||
}
|
||||
if(click === 2) {
|
||||
if (compare)
|
||||
{
|
||||
if (compare) {
|
||||
startCompare = null;
|
||||
endCompare = null;
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
start = null;
|
||||
end = null;
|
||||
}
|
||||
|
||||
click = null;
|
||||
switched = false;
|
||||
if (compare) {
|
||||
@@ -425,7 +388,7 @@
|
||||
}
|
||||
|
||||
if(!switched) {click = 1;} else {click = 2;}
|
||||
if(!switched){
|
||||
if(!switched) {
|
||||
if (compare) {
|
||||
$("#date-end-compare").val(null).focus().addClass("input-selected");
|
||||
target.addClass("start-selected-compare").addClass("end-selected-compare");
|
||||
@@ -435,10 +398,12 @@
|
||||
}
|
||||
}
|
||||
|
||||
if (compare)
|
||||
if (compare) {
|
||||
$("#date-start-compare").removeClass("input-selected").addClass("input-complete");
|
||||
else
|
||||
}
|
||||
else {
|
||||
$("#date-start").removeClass("input-selected").addClass("input-complete");
|
||||
}
|
||||
}
|
||||
//define end
|
||||
else {
|
||||
@@ -460,57 +425,67 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
if (target.is('.old')||target.is('.new')){
|
||||
var day = parseInt(target.text(), 10)||1;
|
||||
var month = this.viewDate.getMonth();
|
||||
var year = this.viewDate.getFullYear();
|
||||
if (target.is('.old')) {
|
||||
month -= 1;
|
||||
} else if (target.is('.new')) {
|
||||
month += 1;
|
||||
}
|
||||
this.viewDate = new Date(year, month, Math.min(28, day),0,0,0,0);
|
||||
this.fill();
|
||||
this.set();
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
range: function(){
|
||||
updateRange: function() {
|
||||
$("#datepicker .day").each(function(){
|
||||
var date_val = parseInt($(this).data('val'),10);
|
||||
|
||||
if (end && start) {
|
||||
if(date_val > start && date_val < end) {
|
||||
$(this).addClass("range");
|
||||
}
|
||||
if(date_val === start) {
|
||||
$(this).addClass("start-selected");
|
||||
}
|
||||
if(date_val === end) {
|
||||
$(this).addClass("end-selected");
|
||||
}
|
||||
}
|
||||
|
||||
if (endCompare && startCompare) {
|
||||
$(this).removeClass("range-compare").removeClass("start-selected-compare").removeClass("end-selected-compare");
|
||||
|
||||
if(date_val > startCompare && date_val < endCompare) {
|
||||
$(this).addClass("range-compare");
|
||||
}
|
||||
if(date_val === startCompare) {
|
||||
$(this).addClass("start-selected-compare");
|
||||
}
|
||||
if(date_val === endCompare) {
|
||||
$(this).addClass("end-selected-compare");
|
||||
}
|
||||
} else {
|
||||
$(this).removeClass("range-compare").removeClass("start-selected-compare").removeClass("end-selected-compare");
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
mouseoverRange: function(){
|
||||
//range
|
||||
$("#datepicker .day").each(function(){
|
||||
val = parseInt($(this).data('val'),10);
|
||||
if (compare)
|
||||
{
|
||||
if (!endCompare)
|
||||
{
|
||||
if( val > startCompare && val < over)
|
||||
$(this).not(".old").not(".new").addClass("range-compare");
|
||||
var date_val = parseInt($(this).data('val'),10);
|
||||
if (compare) {
|
||||
if (!endCompare && date_val > startCompare && date_val < over) {
|
||||
$(this).not(".old").not(".new").addClass("range-compare");
|
||||
}
|
||||
else if (!startCompare)
|
||||
{
|
||||
if( val > over && val < endCompare)
|
||||
$(this).not(".old").not(".new").addClass("range-compare");
|
||||
else if (!startCompare && date_val > over && date_val < endCompare) {
|
||||
$(this).not(".old").not(".new").addClass("range-compare");
|
||||
}
|
||||
else if (startCompare && endCompare)
|
||||
else if (startCompare && endCompare) {
|
||||
$(this).addClass("range-compare");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!end)
|
||||
{
|
||||
if( val > start && val < over)
|
||||
$(this).not(".old").not(".new").addClass("range");
|
||||
else {
|
||||
if (!end && date_val > start && date_val < over) {
|
||||
$(this).not(".old").not(".new").addClass("range");
|
||||
}
|
||||
else if (!start)
|
||||
{
|
||||
if( val > over && val < end)
|
||||
$(this).not(".old").not(".new").addClass("range");
|
||||
else if (!start && date_val > over && date_val < end) {
|
||||
$(this).not(".old").not(".new").addClass("range");
|
||||
}
|
||||
else if (start && end)
|
||||
$(this).addClass("range");
|
||||
}
|
||||
});
|
||||
},
|
||||
@@ -519,19 +494,12 @@
|
||||
//data-val from day overed
|
||||
over = $(e.target).data("val");
|
||||
|
||||
//this condition will focus start just after mouseover on datepicker, but it's weird...
|
||||
//if(click==2){
|
||||
//$("#date-start").focus().addClass("input-selected")
|
||||
//}
|
||||
|
||||
//action after first click
|
||||
//action when one of two dates has been set
|
||||
if(click === 1 && over){
|
||||
if (compare)
|
||||
{
|
||||
if (compare) {
|
||||
$("#datepicker .range-compare").removeClass("range-compare");
|
||||
|
||||
if (startCompare && over < startCompare)
|
||||
{
|
||||
if (startCompare && over < startCompare) {
|
||||
endCompare = startCompare;
|
||||
$("#date-end-compare").val(DPGlobal.formatDate(new Date(startCompare), DPGlobal.parseFormat('Y-m-d'))).removeClass("input-selected");
|
||||
$("#date-start-compare").val(null).focus().addClass("input-selected");
|
||||
@@ -539,8 +507,7 @@
|
||||
startCompare = null;
|
||||
switched = true;
|
||||
}
|
||||
else if (endCompare && over > endCompare)
|
||||
{
|
||||
else if (endCompare && over > endCompare) {
|
||||
startCompare = endCompare;
|
||||
$("#date-start-compare").val(DPGlobal.formatDate(new Date(endCompare), DPGlobal.parseFormat('Y-m-d'))).removeClass("input-selected");
|
||||
$("#date-end-compare").val(null).focus().addClass("input-selected");
|
||||
@@ -549,23 +516,19 @@
|
||||
switched = false;
|
||||
}
|
||||
|
||||
if(startCompare)
|
||||
{
|
||||
if (startCompare) {
|
||||
$(".end-selected-compare").removeClass("end-selected-compare");
|
||||
$(e.target).addClass("end-selected-compare");
|
||||
}
|
||||
else if(endCompare)
|
||||
{
|
||||
else if (endCompare) {
|
||||
$(".start-selected-compare").removeClass("start-selected-compare");
|
||||
$(e.target).addClass("start-selected-compare");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
$("#datepicker .range").removeClass("range");
|
||||
|
||||
if (start && over < start)
|
||||
{
|
||||
if (start && over < start) {
|
||||
end = start;
|
||||
$("#date-end").val(DPGlobal.formatDate(new Date(start), DPGlobal.parseFormat('Y-m-d'))).removeClass("input-selected");
|
||||
$('#date-end').trigger('change');
|
||||
@@ -574,8 +537,7 @@
|
||||
start = null;
|
||||
switched = true;
|
||||
}
|
||||
else if (end && over > end)
|
||||
{
|
||||
else if (end && over > end) {
|
||||
start = end;
|
||||
$("#date-start").val(DPGlobal.formatDate(new Date(end), DPGlobal.parseFormat('Y-m-d'))).removeClass("input-selected");
|
||||
$('#date-start').trigger('change');
|
||||
@@ -585,45 +547,42 @@
|
||||
switched = false;
|
||||
}
|
||||
|
||||
if(start)
|
||||
{
|
||||
if (start) {
|
||||
$(".end-selected").removeClass("end-selected");
|
||||
$(e.target).addClass("end-selected");
|
||||
}
|
||||
else if(end)
|
||||
{
|
||||
else if (end) {
|
||||
$(".start-selected").removeClass("start-selected");
|
||||
$(e.target).addClass("start-selected");
|
||||
}
|
||||
}
|
||||
//switch
|
||||
|
||||
$(".date-input").removeClass("input-complete");
|
||||
this.range();
|
||||
this.mouseoverRange();
|
||||
}
|
||||
},
|
||||
|
||||
mouseout: function(){
|
||||
if (compare)
|
||||
{
|
||||
if (!startCompare||!endCompare)
|
||||
if (compare) {
|
||||
if (!startCompare||!endCompare) {
|
||||
$("#datepicker .range-compare").removeClass("range-compare");
|
||||
|
||||
if (!endCompare)
|
||||
}
|
||||
if (!endCompare) {
|
||||
$(".end-selected-compare").removeClass("end-selected-compare");
|
||||
|
||||
}
|
||||
else if (!startCompare)
|
||||
$(".start-selected-compare").removeClass("start-selected-compare");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!start||!end)
|
||||
else {
|
||||
if (!start||!end) {
|
||||
$("#datepicker .range").removeClass("range");
|
||||
|
||||
if (!end)
|
||||
}
|
||||
if (!end) {
|
||||
$(".end-selected").removeClass("end-selected");
|
||||
else if (!start)
|
||||
}
|
||||
else if (!start) {
|
||||
$(".start-selected").removeClass("start-selected");
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -36,46 +36,48 @@
|
||||
<div class="col-lg-12">
|
||||
{if $warning}
|
||||
<div class="alert alert-warning">{$warning}</div>
|
||||
{/if}
|
||||
{/if}
|
||||
<div id="calendar" class="panel">
|
||||
<form action="{$action|escape}" method="post" id="calendar_form" name="calendar_form" class="form-inline">
|
||||
<div class="row">
|
||||
<div class="col-lg-6">
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" name="submitDateDay" class="btn btn-default submitDateDay" onclick="setDayPeriod()">{$translations.Day}</button>
|
||||
<button type="button" name="submitDateMonth" class="btn btn-default submitDateMonth" onclick="setMonthPeriod()">{$translations.Month}</button>
|
||||
<button type="button" name="submitDateYear" class="btn btn-default submitDateYear" onclick="setYearPeriod()">{$translations.Year}</button>
|
||||
<button type="button" name="submitDateDayPrev" class="btn btn-default submitDateDayPrev" onclick="setPreviousDayPeriod()">{$translations.Day}-1</button>
|
||||
<button type="button" name="submitDateMonthPrev" class="btn btn-default submitDateMonthPrev" onclick="setPreviousMonthPeriod()">{$translations.Month}-1</button>
|
||||
<button type="button" name="submitDateYearPrev" class="btn btn-default submitDateYearPrev" onclick="setPreviousYearPeriod()">{$translations.Year}-1</button>
|
||||
<button type="button" name="submitDateDay" class="btn btn-default submitDateDay">
|
||||
{l s='Day'}
|
||||
</button>
|
||||
<button type="button" name="submitDateMonth" class="btn btn-default submitDateMonth">
|
||||
{l s='Month'}
|
||||
</button>
|
||||
<button type="button" name="submitDateYear" class="btn btn-default submitDateYear">
|
||||
{l s='Year'}
|
||||
</button>
|
||||
<button type="button" name="submitDateDayPrev" class="btn btn-default submitDateDayPrev">
|
||||
{l s='Day'}-1
|
||||
</button>
|
||||
<button type="button" name="submitDateMonthPrev" class="btn btn-default submitDateMonthPrev">
|
||||
{l s='Month'}-1
|
||||
</button>
|
||||
<button type="button" name="submitDateYearPrev" class="btn btn-default submitDateYearPrev">
|
||||
{l s='Year'}-1
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<label class="input-group-addon">{if isset($translations.From)}{$translations.From}{else}{l s='From:'}{/if}</label>
|
||||
<input type="text" name="datepickerFrom" id="datepickerFrom" value="{$datepickerFrom|escape}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-6">
|
||||
<div class="input-group">
|
||||
<label class="input-group-addon">{if isset($translations.To)}{$translations.To}{else}{l s='From:'}{/if}</label>
|
||||
<input type="text" name="datepickerTo" id="datepickerTo" value="{$datepickerTo|escape}" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="datepickerFrom" id="datepickerFrom" value="{$datepickerFrom|escape}" class="form-control">
|
||||
|
||||
<input type="hidden" name="datepickerTo" id="datepickerTo" value="{$datepickerTo|escape}" class="form-control">
|
||||
|
||||
<div class="form-group pull-right">
|
||||
<button id="datepickerExpand" class="btn btn-default" type="button">
|
||||
<i class="icon-calendar-empty"></i>
|
||||
{l s='From'}
|
||||
<strong class="text-info">{$datepickerFrom|escape}</strong>
|
||||
- {l s='To'}
|
||||
<strong class="text-info">{$datepickerTo|escape}</strong>
|
||||
- 13 Days
|
||||
<i class="icon-caret-down"></i>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
{$calendar}
|
||||
</div>
|
||||
</div>
|
||||
{$calendar}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -95,14 +97,16 @@
|
||||
<div class="col-lg-2">
|
||||
|
||||
<section class="dash_news panel">
|
||||
<h4><i class="icon-rss"></i> PrestaShop News</h4>
|
||||
<h3><i class="icon-rss"></i> PrestaShop News</h3>
|
||||
<div class="dash_news_content"></div>
|
||||
</section>
|
||||
|
||||
<section id="dash_version" class="visible-lg">
|
||||
<iframe frameborder="no" scrolling="no" allowtransparency="true" src="{$new_version_url}"></iframe>
|
||||
</section>
|
||||
|
||||
<section class="dash_links panel">
|
||||
<h4><i class="icon-link"></i> {l s="Useful PrestaShop Links"}</h4>
|
||||
<h3><i class="icon-link"></i> {l s="Useful Links"}</h3>
|
||||
<dl>
|
||||
<dt>{l s="Discover the official documentation"}</dt>
|
||||
<dd><a href="http://doc.prestashop.com/display/PS16?utm_source=backoffice_dashboard" target="_blank">{l s="Go to doc.prestashop.com"}</a></dd>
|
||||
@@ -126,17 +130,4 @@
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#datepickerFrom').click(function() {
|
||||
$('#datepicker').slideDown(200);
|
||||
$('#date-start').focus();
|
||||
});
|
||||
|
||||
$('#datepickerTo').click(function() {
|
||||
$('#datepicker').slideDown(200);
|
||||
$('#date-end').focus();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
@@ -109,67 +109,69 @@
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group btn-group-action">
|
||||
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||
<a class="btn btn-default" href="{$module->addons_buy_url}" target="_blank">
|
||||
<i class="icon-shopping-cart"></i> {if isset($module->id_currency) && isset($module->price)}{displayPrice price=$module->price currency=$module->id_currency}{/if}
|
||||
</a>
|
||||
{else}
|
||||
{if isset($module->id) && $module->id gt 0}
|
||||
{if isset($module->version_addons) && $module->version_addons}
|
||||
<a class="btn btn-warning" href="{$module->options.update_url}">
|
||||
<i class="icon-refresh"></i> {l s='Update it!'}
|
||||
</a>
|
||||
{elseif !isset($module->not_on_disk)}
|
||||
{if $module->optionsHtml|count > 0}
|
||||
{assign var=option value=$module->optionsHtml[0]}
|
||||
{$option}
|
||||
{/if}
|
||||
{else}
|
||||
<a class="btn btn-danger" {if !empty($module->options.uninstall_onclick)}onclick="{$module->options.uninstall_onclick}"{/if} href="{$module->options.uninstall_url}">
|
||||
<i class="icon-minus-sign-alt"></i> {l s='Uninstall'}
|
||||
</a>
|
||||
{/if}
|
||||
{else}
|
||||
<a class="btn btn-success" href="{$module->options.install_url}">
|
||||
<i class="icon-plus-sign-alt"></i> {l s='Install'}
|
||||
<div class="btn-group-action">
|
||||
<div class="btn-group">
|
||||
{if isset($module->type) && $module->type == 'addonsMustHave'}
|
||||
<a class="btn btn-default" href="{$module->addons_buy_url}" target="_blank">
|
||||
<i class="icon-shopping-cart"></i> {if isset($module->id_currency) && isset($module->price)}{displayPrice price=$module->price currency=$module->id_currency}{/if}
|
||||
</a>
|
||||
{/if}
|
||||
{if !isset($module->not_on_disk)}
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" >
|
||||
<span class="caret"> </span>
|
||||
</button>
|
||||
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $module->optionsHtml key=key item=option}
|
||||
{if $key != 0}
|
||||
<li>{$option}</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if isset($module->preferences) && isset($module->preferences['favorite']) && $module->preferences['favorite'] == 1}
|
||||
<li>
|
||||
<a class="action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#">
|
||||
<i class="icon-star"></i> {l s='Remove from Favorites'}
|
||||
</a>
|
||||
<a class="action_module action_favorite toggle_favorite" data-module="{$module->name}" data-value="1" href="#" style="display: none;">
|
||||
<i class="icon-star"></i> {l s='Mark as Favorite'}
|
||||
</a>
|
||||
</li>
|
||||
{else}
|
||||
<li>
|
||||
<a class="action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#" style="display: none;">
|
||||
<i class="icon-star"></i> {l s='Remove from Favorites'}
|
||||
</a>
|
||||
<a class="action_module action_favorite toggle_favorite" data-module="{$module->name}" data-value="1" href="#">
|
||||
<i class="icon-star"></i> {l s='Mark as Favorite'}
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
{else}
|
||||
|
||||
{if isset($module->id) && $module->id gt 0}
|
||||
{if isset($module->version_addons) && $module->version_addons}
|
||||
<a class="btn btn-warning" href="{$module->options.update_url}">
|
||||
<i class="icon-refresh"></i> {l s='Update it!'}
|
||||
</a>
|
||||
{elseif !isset($module->not_on_disk)}
|
||||
{if $module->optionsHtml|count > 0}
|
||||
{assign var=option value=$module->optionsHtml[0]}
|
||||
{$option}
|
||||
{/if}
|
||||
{else}
|
||||
<a class="btn btn-danger" {if !empty($module->options.uninstall_onclick)}onclick="{$module->options.uninstall_onclick}"{/if} href="{$module->options.uninstall_url}">
|
||||
<i class="icon-minus-sign-alt"></i> {l s='Uninstall'}
|
||||
</a>
|
||||
{/if}
|
||||
{else}
|
||||
<a class="btn btn-success" href="{$module->options.install_url}">
|
||||
<i class="icon-plus-sign-alt"></i> {l s='Install'}
|
||||
</a>
|
||||
{/if}
|
||||
{if !isset($module->not_on_disk)}
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" >
|
||||
<span class="caret"> </span>
|
||||
</button>
|
||||
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $module->optionsHtml key=key item=option}
|
||||
{if $key != 0}
|
||||
<li>{$option}</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if isset($module->preferences) && isset($module->preferences['favorite']) && $module->preferences['favorite'] == 1}
|
||||
<li>
|
||||
<a class="action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#">
|
||||
<i class="icon-star"></i> {l s='Remove from Favorites'}
|
||||
</a>
|
||||
<a class="action_module action_favorite toggle_favorite" data-module="{$module->name}" data-value="1" href="#" style="display: none;">
|
||||
<i class="icon-star"></i> {l s='Mark as Favorite'}
|
||||
</a>
|
||||
</li>
|
||||
{else}
|
||||
<li>
|
||||
<a class="action_module action_unfavorite toggle_favorite" data-module="{$module->name}" data-value="0" href="#" style="display: none;">
|
||||
<i class="icon-star"></i> {l s='Remove from Favorites'}
|
||||
</a>
|
||||
<a class="action_module action_favorite toggle_favorite" data-module="{$module->name}" data-value="1" href="#">
|
||||
<i class="icon-star"></i> {l s='Mark as Favorite'}
|
||||
</a>
|
||||
</li>
|
||||
{/if}
|
||||
</ul>
|
||||
{else}
|
||||
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -87,8 +87,11 @@
|
||||
<div class="categoriesTitle col-lg-3">
|
||||
<div class="list-group">
|
||||
<form id="filternameForm" method="post" class="list-group-item form-horizontal">
|
||||
<div class="input-group col-lg-12">
|
||||
<input placeholder="{l s='Search'}" type="text" value="" name="moduleQuicksearch" id="moduleQuicksearch" autocomplete="off" />
|
||||
<div class="input-group">
|
||||
<input class="form-control" placeholder="{l s='Search'}" type="text" value="" name="moduleQuicksearch" id="moduleQuicksearch" autocomplete="off" />
|
||||
<div class="input-group-addon">
|
||||
<i class="icon-search"></i>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<a class="list-group-item {if isset($categoryFiltered.favorites)}active{/if}" href="{$currentIndex}&token={$token}&filterCategory=favorites">
|
||||
|
||||
@@ -433,7 +433,18 @@
|
||||
<div class="translatable-field lang-{$language.id_lang}">
|
||||
<div class="col-lg-9">
|
||||
{/if}
|
||||
<input type="text" id="tags_{$language.id_lang}" class=" updateCurrentText" name="tags_{$language.id_lang}" value="{$product->getTags($language.id_lang, true)|htmlentitiesUTF8}" />
|
||||
{literal}
|
||||
<script type="text/javascript">
|
||||
$().ready(function () {
|
||||
var input_id = '{/literal}tags_{$language.id_lang}{literal}';
|
||||
$('#'+input_id).tagify({delimiters: [13,44], addTagPrompt: '{/literal}{l s='Add tag' js=1}{literal}'});
|
||||
$({/literal}'#{$table}{literal}_form').submit( function() {
|
||||
$(this).find('#'+input_id).val($('#'+input_id).tagify('serialize'));
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
||||
<input type="text" id="tags_{$language.id_lang}" class="tagify updateCurrentText" name="tags_{$language.id_lang}" value="{$product->getTags($language.id_lang, true)|htmlentitiesUTF8}" />
|
||||
{if $languages|count > 1}
|
||||
</div>
|
||||
<div class="col-lg-2">
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
{if count($modules)}
|
||||
{foreach $modules as $module}
|
||||
{if $module_instance[$module.name]}
|
||||
<a class="list-group-item{if ($current_module_name && $current_module_name == $module.name) || (!$current_module_name && $module@first)} active{/if}" href="{$current}&token={$token}&module={$module.name}">{$module_instance[$module.name]->displayName}</a>
|
||||
<a class="list-group-item{if ($current_module_name && $current_module_name == $module.name)} active{/if}" href="{$current}&token={$token}&module={$module.name}">{$module_instance[$module.name]->displayName}</a>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{else}
|
||||
|
||||
+19
-17
@@ -128,23 +128,25 @@
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if $compiled_actions|count > 0}
|
||||
<div class="btn-group{if $compiled_actions|count > 1} btn-group-action{/if}">
|
||||
{$compiled_actions[0]|regex_replace:'/class\s*=\s*"(\w*)"/':'class="$1 btn btn-default"'}
|
||||
{if $compiled_actions|count > 1}
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $compiled_actions AS $key => $action}
|
||||
{if $key != 0}
|
||||
<li>
|
||||
{$action}
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
{if $compiled_actions|count > 1}<div class="btn-group-action">{/if}
|
||||
<div class="btn-group">
|
||||
{$compiled_actions[0]|regex_replace:'/class\s*=\s*"(\w*)"/':'class="$1 btn btn-default"'}
|
||||
{if $compiled_actions|count > 1}
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $compiled_actions AS $key => $action}
|
||||
{if $key != 0}
|
||||
<li>
|
||||
{$action}
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
{if $compiled_actions|count > 1}</div>{/if}
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
@@ -69,7 +69,7 @@
|
||||
btn_submit.hide();
|
||||
//bind enter key press to validate form
|
||||
$('#{$table}_form').find('input').keypress(function (e) {
|
||||
if (e.which == 13 && e.target.localName != 'textarea')
|
||||
if (e.which == 13 && e.target.localName != 'textarea' && !e.target.hasClass('tagify'))
|
||||
$('#desc-{$table}-save').click();
|
||||
});
|
||||
//submit the form
|
||||
|
||||
@@ -224,7 +224,10 @@
|
||||
<i class="icon-caret-down"></i>
|
||||
</button>
|
||||
<ul id="header_search_options" class="dropdown-menu">
|
||||
<li class="search-all search-option active"><a href="#" data-value="0" data-placeholder="{l s='What are you looking for?'}"><i class="icon-search"></i> {l s='Everywhere'}</a></li>
|
||||
<li class="search-all search-option active">
|
||||
<a href="#" data-value="0" data-placeholder="{l s='What are you looking for?'}" data-icon="icon-reorder">
|
||||
<i class="icon-search"></i> {l s='Everywhere'}</a>
|
||||
</li>
|
||||
<li class="divider"></li>
|
||||
<li class="search-book search-option">
|
||||
<a href="#" data-value="1" data-placeholder="{l s='Product name, SKU, reference...'}" data-icon="icon-book">
|
||||
@@ -283,23 +286,23 @@
|
||||
$('#bo_query').attr("placeholder",$(this).data('placeholder'));
|
||||
$('#bo_query').focus();
|
||||
});
|
||||
{if isset($search_type) && $search_type}
|
||||
$(document).ready(function() {
|
||||
$('.search-option a[data-value='+{$search_type|intval}+']').click();
|
||||
});
|
||||
{/if}
|
||||
</script>
|
||||
|
||||
<!-- js
|
||||
<!-- todo js
|
||||
OK - size up search field on focus
|
||||
- prevent blank search
|
||||
(?) - prevent blank search
|
||||
OK - dropdown menu as select
|
||||
OK - fill input hidden field with data value from list item
|
||||
OK - change icon in suffix
|
||||
OK - set active on right list item
|
||||
OK - focus input field
|
||||
OK - change place holder
|
||||
- use change for first init
|
||||
- clear search
|
||||
(?) - keep focus state when keyword exists
|
||||
|
||||
old code sample:
|
||||
<option value="1" {if {$search_type} == 1} selected="selected" {/if}>{l s='catalog'}</option>
|
||||
(?) - keep focus state when search exists
|
||||
-->
|
||||
</form>
|
||||
|
||||
@@ -369,4 +372,4 @@
|
||||
<body{if isset($lite_display) && $lite_display} class="display-modal"{/if}>
|
||||
<div id="main">
|
||||
<div id="content" class="page-content">
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
@@ -1,80 +1,83 @@
|
||||
<div id="datepicker" class="daterangepicker-days">
|
||||
<div class="row">
|
||||
{if $is_rtl}
|
||||
<div class="col-sm-6 col-lg-4">
|
||||
<div class="datepicker2" data-date="{$date_to}" data-date-format="{$date_format}"></div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-lg-4">
|
||||
<div class="datepicker1" data-date="{$date_from}" data-date-format="{$date_format}"></div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="col-sm-6 col-lg-4">
|
||||
<div class="datepicker1" data-date="{$date_from}" data-date-format="{$date_format}"></div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-lg-4">
|
||||
<div class="datepicker2" data-date="{$date_to}" data-date-format="{$date_format}"></div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-lg-4 clearfix">
|
||||
<div id='datepicker-form' class='form-inline'>
|
||||
|
||||
<div id='date-range' class='form-date-group'>
|
||||
<div class='form-date-heading'>
|
||||
<span class="title">{l s='Date range'}</span>
|
||||
{if isset($actions) && $actions|count > 0}
|
||||
{if $actions|count > 1}
|
||||
<button class='btn btn-default btn-xs pull-right dropdown-toggle' data-toggle='dropdown' type="button">
|
||||
{l s='Custom'}
|
||||
<i class='icon-angle-down'></i>
|
||||
<div id="datepicker" class="row row-padding-top hide">
|
||||
<div class="col-lg-12">
|
||||
<div class="daterangepicker-days">
|
||||
<div class="row">
|
||||
{if $is_rtl}
|
||||
<div class="col-sm-6 col-lg-4">
|
||||
<div class="datepicker2" data-date="{$date_to}" data-date-format="{$date_format}"></div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-lg-4">
|
||||
<div class="datepicker1" data-date="{$date_from}" data-date-format="{$date_format}"></div>
|
||||
</div>
|
||||
{else}
|
||||
<div class="col-sm-6 col-lg-4">
|
||||
<div class="datepicker1" data-date="{$date_from}" data-date-format="{$date_format}"></div>
|
||||
</div>
|
||||
<div class="col-sm-6 col-lg-4">
|
||||
<div class="datepicker2" data-date="{$date_to}" data-date-format="{$date_format}"></div>
|
||||
</div>
|
||||
{/if}
|
||||
<div class="col-sm-12 col-lg-4 pull-right">
|
||||
<div id='datepicker-form' class='form-inline'>
|
||||
<div id='date-range' class='form-date-group'>
|
||||
<div class='form-date-heading'>
|
||||
<span class="title">{l s='Date range'}</span>
|
||||
{if isset($actions) && $actions|count > 0}
|
||||
{if $actions|count > 1}
|
||||
<button class='btn btn-default btn-xs pull-right dropdown-toggle' data-toggle='dropdown' type="button">
|
||||
{l s='Custom'}
|
||||
<i class='icon-angle-down'></i>
|
||||
</button>
|
||||
<ul class='dropdown-menu'>
|
||||
{foreach from=$actions item=action}
|
||||
<li><a{if isset($action.href)} href="{$action.href}"{/if}{if isset($action.class)} class="{$action.class}"{/if}>{if isset($action.icon)}<i class="{$action.icon}"></i> {/if}{$action.label}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
<a{if isset($actions[0].href)} href="{$actions[0].href}"{/if} class="btn btn-default btn-xs pull-right{if isset($actions[0].class)} {$actions[0].class}{/if}">{if isset($actions[0].icon)}<i class="{$actions[0].icon}"></i> {/if}{$actions[0].label}</a>
|
||||
{/if}
|
||||
{/if}
|
||||
</div>
|
||||
<div class='form-date-body'>
|
||||
<label>{l s='From'}</label>
|
||||
<input class='date-input form-control' id='date-start' placeholder='Start' type='text' name="date_from" value="{$date_from}" data-date-format="{$date_format}" tabindex="1" />
|
||||
<label>{l s='to'}</label>
|
||||
<input class='date-input form-control' id='date-end' placeholder='End' type='text' name="date_to" value="{$date_to}" data-date-format="{$date_format}" tabindex="2" />
|
||||
</div>
|
||||
</div>
|
||||
<div id="date-compare" class='form-date-group'>
|
||||
<div class='form-date-heading'>
|
||||
<span class="checkbox-title">
|
||||
<label >
|
||||
<input type='checkbox' id="datepicker-compare" name="datepicker_compare"{if isset($compare_date_from) && isset($compare_date_to)} checked="checked"{/if} tabindex="3">
|
||||
{l s='Compare to'}
|
||||
</label>
|
||||
</span>
|
||||
<select id="compare-options" class="form-control fixed-width-lg pull-right" name="compare_date_option"{if is_null($compare_date_from) || is_null($compare_date_to)} disabled="disabled"{/if}>
|
||||
<option value="1"{if $compare_option == 1}selected="selected"{/if} label="{l s='Previous period'}">{l s='Previous period'}</option>
|
||||
<option value="2"{if $compare_option == 2}selected="selected"{/if} label="{l s='Previous Year'}">{l s='Previous Year'}</option>
|
||||
<option value="3"{if $compare_option == 3}selected="selected"{/if} label="{l s='Custom'}">{l s='Custom'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-date-body" id="form-date-body-compare"{if is_null($compare_date_from) || is_null($compare_date_to)} style="display: none;"{/if}>
|
||||
<label>{l s='From'}</label>
|
||||
<input id="date-start-compare" class="date-input form-control" type="text" placeholder="Start" name="compare_date_from" value="{$compare_date_from}" data-date-format="{$date_format}" tabindex="4" />
|
||||
<label>{l s='to'}</label>
|
||||
<input id="date-end-compare" class="date-input form-control" type="text" placeholder="End" name="compare_date_to" value="{$compare_date_to}" data-date-format="{$date_format}"
|
||||
tabindex="5" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='form-date-actions'>
|
||||
<button class='btn btn-link' type='button' id="datepicker-cancel" tabindex="7">
|
||||
<i class='icon-remove'></i>
|
||||
{l s='Cancel'}
|
||||
</button>
|
||||
<ul class='dropdown-menu'>
|
||||
{foreach from=$actions item=action}
|
||||
<li><a{if isset($action.href)} href="{$action.href}"{/if}{if isset($action.class)} class="{$action.class}"{/if}>{if isset($action.icon)}<i class="{$action.icon}"></i> {/if}{$action.label}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{else}
|
||||
<a{if isset($actions[0].href)} href="{$actions[0].href}"{/if} class="btn btn-default btn-xs pull-right{if isset($actions[0].class)} {$actions[0].class}{/if}">{if isset($actions[0].icon)}<i class="{$actions[0].icon}"></i> {/if}{$actions[0].label}</a>
|
||||
{/if}
|
||||
{/if}
|
||||
<button class='btn btn-default pull-right' type='submit' name="submitDateRange" tabindex="6">
|
||||
<i class='icon-ok text-success'></i>
|
||||
{l s='Apply'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class='form-date-body'>
|
||||
<label>{l s='From'}</label>
|
||||
<input class='date-input form-control' id='date-start' placeholder='Start' type='text' name="date_from" value="{$date_from}" data-date-format="{$date_format}" />
|
||||
<label>{l s='to'}</label>
|
||||
<input class='date-input form-control' id='date-end' placeholder='End' type='text' name="date_to" value="{$date_to}" data-date-format="{$date_format}" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="date-compare" class='form-date-group'>
|
||||
<div class='form-date-heading'>
|
||||
<span class="checkbox-title">
|
||||
<label >
|
||||
<input type='checkbox' id="datepicker-compare" name="datepicker_compare"{if isset($compare_date_from) && isset($compare_date_to)} checked="checked"{/if}>
|
||||
{l s='Compare to'}
|
||||
</label>
|
||||
</span>
|
||||
<select id="compare-options" class="form-control fixed-width-lg pull-right" name="compare_date_option"{if is_null($compare_date_from) || is_null($compare_date_to)} disabled="disabled"{/if}>
|
||||
<option value="1"{if $compare_option == 1}selected="selected"{/if} label="{l s='Previous period'}">{l s='Previous period'}</option>
|
||||
<option value="2"{if $compare_option == 2}selected="selected"{/if} label="{l s='Previous Year'}">{l s='Previous Year'}</option>
|
||||
<option value="3"{if $compare_option == 3}selected="selected"{/if} label="{l s='Custom'}">{l s='Custom'}</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-date-body" id="form-date-body-compare"{if is_null($compare_date_from) || is_null($compare_date_to)} style="display: none;"{/if}>
|
||||
<label>{l s='From'}</label>
|
||||
<input id="date-start-compare" class="date-input form-control" type="text" placeholder="Start" name="compare_date_from" value="{$compare_date_from}" data-date-format="{$date_format}" />
|
||||
<label>{l s='to'}</label>
|
||||
<input id="date-end-compare" class="date-input form-control" type="text" placeholder="End" name="compare_date_to" value="{$compare_date_to}" data-date-format="{$date_format}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class='form-date-actions'>
|
||||
<button class='btn btn-default' type='button' id="datepicker-cancel">
|
||||
<i class='icon-remove text-danger'></i>
|
||||
{l s='Cancel'}
|
||||
</button>
|
||||
<button class='btn btn-default pull-right' type='submit' name="submitDateRange">
|
||||
<i class='icon-ok text-success'></i>
|
||||
{l s='Apply'}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -94,7 +94,7 @@
|
||||
<script type="text/javascript">
|
||||
$().ready(function () {
|
||||
var input_id = '{/literal}{if isset($input.id)}{$input.id}_{$language.id_lang}{else}{$input.name}_{$language.id_lang}{/if}{literal}';
|
||||
$('#'+input_id).tagify({addTagPrompt: '{/literal}{l s='Add tag' js=1}{literal}'});
|
||||
$('#'+input_id).tagify({delimiters: [13,44], addTagPrompt: '{/literal}{l s='Add tag' js=1}{literal}'});
|
||||
$({/literal}'#{$table}{literal}_form').submit( function() {
|
||||
$(this).find('#'+input_id).val($('#'+input_id).tagify('serialize'));
|
||||
});
|
||||
@@ -179,7 +179,7 @@
|
||||
$().ready(function () {
|
||||
var input_id = '{/literal}{if isset($input.id)}{$input.id}{else}{$input.name}{/if}{literal}';
|
||||
$('#'+input_id).tagify();
|
||||
$('#'+input_id).tagify({addTagPrompt: '{/literal}{l s='Add tag'}{literal}'});
|
||||
$('#'+input_id).tagify({delimiters: [13,44],addTagPrompt: '{/literal}{l s='Add tag'}{literal}'});
|
||||
$({/literal}'#{$table}{literal}_form').submit( function() {
|
||||
$(this).find('#'+input_id).val($('#'+input_id).tagify('serialize'));
|
||||
});
|
||||
|
||||
@@ -22,9 +22,9 @@
|
||||
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
<{if $href}a style="display:block" href="{$href|escape}"{else}div{/if} id="{$id|escape}" class="box-stats {$color|escape}" >
|
||||
{if $icon}<i class="{$icon|escape}"></i>{/if}
|
||||
{if $chart}
|
||||
<{if isset($href) && $href}a style="display:block" href="{$href|escape}"{else}div{/if} id="{$id|escape}" class="box-stats {$color|escape}" >
|
||||
{if isset($icon) && $icon}<i class="{$icon|escape}"></i>{/if}
|
||||
{if isset($chart) && $chart}
|
||||
<div class="boxchart-overlay">
|
||||
<div class="boxchart">
|
||||
</div>
|
||||
@@ -34,7 +34,7 @@
|
||||
<span class="value">{$value|escape}</span>
|
||||
</{if $href}a{else}div{/if}>
|
||||
|
||||
{if $source != ''}
|
||||
{if isset($source) && $source != ''}
|
||||
<script>
|
||||
$.ajax({
|
||||
url: '{$source|addslashes}' + '&rand=' + new Date().getTime(),
|
||||
|
||||
@@ -151,23 +151,25 @@
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if $compiled_actions|count > 0}
|
||||
<div class="btn-group{if $compiled_actions|count > 1} btn-group-action{/if}">
|
||||
{$compiled_actions[0]|regex_replace:'/class\s*=\s*"(\w*)"/':'class="$1 btn btn-default"'}
|
||||
{if $compiled_actions|count > 1}
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $compiled_actions AS $key => $action}
|
||||
{if $key != 0}
|
||||
<li>
|
||||
{$action}
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
{if $compiled_actions|count > 1}<div class="btn-group-action">{/if}
|
||||
<div class="btn-group">
|
||||
{$compiled_actions[0]|regex_replace:'/class\s*=\s*"(\w*)"/':'class="$1 btn btn-default"'}
|
||||
{if $compiled_actions|count > 1}
|
||||
<button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
{foreach $compiled_actions AS $key => $action}
|
||||
{if $key != 0}
|
||||
<li>
|
||||
{$action}
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
{if $compiled_actions|count > 1}</div>{/if}
|
||||
{/if}
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
@@ -243,15 +243,15 @@
|
||||
</tr>
|
||||
{if !$simple_header && $show_filters}
|
||||
<tr class="nodrag nodrop filter {if $row_hover}row_hover{/if}">
|
||||
<td class="text-center">
|
||||
<th class="text-center">
|
||||
{if $has_bulk_actions}
|
||||
--
|
||||
{/if}
|
||||
</td>
|
||||
</th>
|
||||
|
||||
{* Filters (input, select, date or bool) *}
|
||||
{foreach $fields_display AS $key => $params}
|
||||
<td {if isset($params.align)} class="{$params.align}" {/if}>
|
||||
<th {if isset($params.align)} class="{$params.align}" {/if}>
|
||||
{if isset($params.search) && !$params.search}
|
||||
--
|
||||
{else}
|
||||
@@ -293,14 +293,14 @@
|
||||
<input type="text" class="filter" name="{$list_id}Filter_{if isset($params.filter_key)}{$params.filter_key}{else}{$key}{/if}" value="{$params.value|escape:'htmlall':'UTF-8'}" {if isset($params.width) && $params.width != 'auto'} style="width:{$params.width}px"{/if} />
|
||||
{/if}
|
||||
{/if}
|
||||
</td>
|
||||
</th>
|
||||
{/foreach}
|
||||
|
||||
{if $shop_link_type}
|
||||
<td>--</td>
|
||||
<th>--</th>
|
||||
{/if}
|
||||
{if $has_actions}
|
||||
<td class="actions">
|
||||
<th class="actions">
|
||||
{if $show_filters}
|
||||
<span class="pull-right">
|
||||
{*Search must be before reset for default form submit*}
|
||||
@@ -314,7 +314,7 @@
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
</td>
|
||||
</th>
|
||||
{/if}
|
||||
</tr>
|
||||
{/if}
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
btn_submit.hide();
|
||||
//bind enter key press to validate form
|
||||
$('#{$table}_form').find('input').keypress(function (e) {
|
||||
if (e.which == 13 && e.target.localName != 'textarea')
|
||||
if (e.which == 13 && e.target.localName != 'textarea' && !e.target.hasClass('tagify'))
|
||||
$('#page-header-desc-{$table}-save').click();
|
||||
});
|
||||
//submit the form
|
||||
|
||||
@@ -1320,6 +1320,8 @@ class AdminControllerCore extends Controller
|
||||
));
|
||||
}
|
||||
$this->layout = 'layout-ajax.tpl';
|
||||
$this->display_header = false;
|
||||
$this->display_footer = false;
|
||||
return $this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@ class AdminAttachmentsControllerCore extends AdminController
|
||||
$this->lang = true;
|
||||
|
||||
$this->addRowAction('edit');
|
||||
$this->addRowAction('view');
|
||||
$this->addRowAction('delete');
|
||||
|
||||
$this->_select = 'IFNULL(virtual.products, 0) as products';
|
||||
@@ -76,6 +77,16 @@ class AdminAttachmentsControllerCore extends AdminController
|
||||
parent::initPageHeaderToolbar();
|
||||
}
|
||||
|
||||
public function renderView()
|
||||
{
|
||||
if (($obj = $this->loadObject(true)) && Validate::isLoadedObject($obj))
|
||||
{
|
||||
$link = $this->context->link->getPageLink('attachment', true, NULL, 'id_attachment='.$obj->id);
|
||||
Tools::redirectLink($link);
|
||||
}
|
||||
return $this->displayWarning($this->l('File not found'));
|
||||
}
|
||||
|
||||
public function renderForm()
|
||||
{
|
||||
if (($obj = $this->loadObject(true)) && Validate::isLoadedObject($obj))
|
||||
|
||||
@@ -368,6 +368,29 @@ class AdminCategoriesControllerCore extends AdminController
|
||||
if (ConfigurationKPI::get('EMPTY_CATEGORIES_EXPIRE') < $time)
|
||||
$helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=empty_categories';
|
||||
$kpis[] = $helper->generate();
|
||||
|
||||
$helper = new HelperKpi();
|
||||
$helper->id = 'box-top-category';
|
||||
$helper->icon = 'icon-money';
|
||||
$helper->color = 'color3';
|
||||
$helper->title = $this->l('Top Category');
|
||||
$helper->subtitle = $this->l('30 days');
|
||||
if (ConfigurationKPI::get('TOP_CATEGORY', $this->context->employee->id_lang) !== false)
|
||||
$helper->value = ConfigurationKPI::get('TOP_CATEGORY', $this->context->employee->id_lang);
|
||||
if (ConfigurationKPI::get('TOP_CATEGORY_EXPIRE', $this->context->employee->id_lang) < $time)
|
||||
$helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=top_category';
|
||||
$kpis[] = $helper->generate();
|
||||
|
||||
$helper = new HelperKpi();
|
||||
$helper->id = 'box-products-per-category';
|
||||
$helper->icon = 'icon-search';
|
||||
$helper->color = 'color4';
|
||||
$helper->title = $this->l('Average number of products per category');
|
||||
if (ConfigurationKPI::get('PRODUCTS_PER_CATEGORY') !== false)
|
||||
$helper->value = ConfigurationKPI::get('PRODUCTS_PER_CATEGORY');
|
||||
if (ConfigurationKPI::get('PRODUCTS_PER_CATEGORY_EXPIRE') < $time)
|
||||
$helper->source = $this->context->link->getAdminLink('AdminStats').'&ajax=1&action=getKpi&kpi=products_per_category';
|
||||
$kpis[] = $helper->generate();
|
||||
|
||||
$helper = new HelperKpiRow();
|
||||
$helper->kpis = $kpis;
|
||||
|
||||
@@ -194,15 +194,15 @@ class AdminDashboardControllerCore extends AdminController
|
||||
if (Tools::isSubmit('profitability_conf'))
|
||||
return parent::renderOptions();
|
||||
|
||||
$translations = array(
|
||||
'Calendar' => $this->l('Calendar', 'AdminStatsTab'),
|
||||
'Day' => $this->l('Day', 'AdminStatsTab'),
|
||||
'Month' => $this->l('Month', 'AdminStatsTab'),
|
||||
'Year' => $this->l('Year', 'AdminStatsTab'),
|
||||
'From' => $this->l('From:', 'AdminStatsTab'),
|
||||
'To' => $this->l('To:', 'AdminStatsTab'),
|
||||
'Save' => $this->l('Save', 'AdminStatsTab')
|
||||
);
|
||||
// $translations = array(
|
||||
// 'Calendar' => $this->l('Calendar', 'AdminStatsTab'),
|
||||
// 'Day' => $this->l('Day', 'AdminStatsTab'),
|
||||
// 'Month' => $this->l('Month', 'AdminStatsTab'),
|
||||
// 'Year' => $this->l('Year', 'AdminStatsTab'),
|
||||
// 'From' => $this->l('From:', 'AdminStatsTab'),
|
||||
// 'To' => $this->l('To:', 'AdminStatsTab'),
|
||||
// 'Save' => $this->l('Save', 'AdminStatsTab')
|
||||
// );
|
||||
|
||||
$calendar_helper = new HelperCalendar();
|
||||
|
||||
@@ -230,7 +230,7 @@ class AdminDashboardControllerCore extends AdminController
|
||||
$this->tpl_view_vars = array(
|
||||
'hookDashboardZoneOne' => Hook::exec('dashboardZoneOne', $params),
|
||||
'hookDashboardZoneTwo' => Hook::exec('dashboardZoneTwo', $params),
|
||||
'translations' => $translations,
|
||||
//'translations' => $translations,
|
||||
'action' => '#',
|
||||
'warning' => $this->getWarningDomainName(),
|
||||
'new_version_url' => Tools::getCurrentUrlProtocolPrefix().'api.prestashop.com/version/check_version.php?v='._PS_VERSION_.'&lang='.$this->context->language->iso_code,
|
||||
|
||||
@@ -1285,14 +1285,6 @@ class AdminProductsControllerCore extends AdminController
|
||||
|
||||
if ($this->display == 'edit' || $this->display == 'add')
|
||||
{
|
||||
$this->addjQueryPlugin(array(
|
||||
'autocomplete',
|
||||
'tablednd',
|
||||
'thickbox',
|
||||
'ajaxfileupload',
|
||||
'date'
|
||||
));
|
||||
|
||||
$this->addJqueryUI(array(
|
||||
'ui.core',
|
||||
'ui.widget',
|
||||
@@ -1301,6 +1293,15 @@ class AdminProductsControllerCore extends AdminController
|
||||
'ui.datepicker'
|
||||
));
|
||||
|
||||
$this->addjQueryPlugin(array(
|
||||
'autocomplete',
|
||||
'tablednd',
|
||||
'thickbox',
|
||||
'ajaxfileupload',
|
||||
'date',
|
||||
'tagify'
|
||||
));
|
||||
|
||||
$this->addJS(array(
|
||||
_PS_JS_DIR_.'productTabsManager.js',
|
||||
_PS_JS_DIR_.'admin-products.js',
|
||||
|
||||
@@ -153,6 +153,14 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
WHERE c.active = 0');
|
||||
}
|
||||
|
||||
public static function getTotalCategories()
|
||||
{
|
||||
return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT COUNT(*)
|
||||
FROM `'._DB_PREFIX_.'category` c
|
||||
'.Shop::addSqlAssociation('category', 'c'));
|
||||
}
|
||||
|
||||
public static function getDisabledProducts()
|
||||
{
|
||||
return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
@@ -162,6 +170,14 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
WHERE product_shop.active = 0');
|
||||
}
|
||||
|
||||
public static function getTotalProducts()
|
||||
{
|
||||
return (int)Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT COUNT(*)
|
||||
FROM `'._DB_PREFIX_.'product` p
|
||||
'.Shop::addSqlAssociation('product', 'p'));
|
||||
}
|
||||
|
||||
public static function getTotalSales($date_from, $date_to, $granularity = false)
|
||||
{
|
||||
if ($granularity == 'day')
|
||||
@@ -232,6 +248,7 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
if ($products_sales > $total_sales)
|
||||
break;
|
||||
}
|
||||
|
||||
return round(100 * $products / $total_products).'%';
|
||||
}
|
||||
|
||||
@@ -307,6 +324,31 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
return array('type' => 'neutral', 'value' => round(100 * $row['neutral'] / $row['total']));
|
||||
}
|
||||
|
||||
public static function getBestCategory($date_from, $date_to)
|
||||
{
|
||||
return Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT ca.`id_category`
|
||||
FROM `'._DB_PREFIX_.'category` ca
|
||||
LEFT JOIN `'._DB_PREFIX_.'category_product` capr ON ca.`id_category` = capr.`id_category`
|
||||
LEFT JOIN (
|
||||
SELECT pr.`id_product`, t.`totalPriceSold`
|
||||
FROM `'._DB_PREFIX_.'product` pr
|
||||
LEFT JOIN (
|
||||
SELECT pr.`id_product`,
|
||||
IFNULL(SUM(cp.`product_quantity`), 0) AS totalQuantitySold,
|
||||
IFNULL(SUM(cp.`product_price` * cp.`product_quantity`), 0) / o.conversion_rate AS totalPriceSold
|
||||
FROM `'._DB_PREFIX_.'product` pr
|
||||
LEFT OUTER JOIN `'._DB_PREFIX_.'order_detail` cp ON pr.`id_product` = cp.`product_id`
|
||||
LEFT JOIN `'._DB_PREFIX_.'orders` o ON o.`id_order` = cp.`id_order`
|
||||
WHERE o.invoice_date BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59"
|
||||
GROUP BY pr.`id_product`
|
||||
) t ON t.`id_product` = pr.`id_product`
|
||||
) t ON t.`id_product` = capr.`id_product`
|
||||
WHERE ca.`level_depth` > 1
|
||||
GROUP BY ca.`id_category`
|
||||
ORDER BY SUM(t.`totalPriceSold`) DESC');
|
||||
}
|
||||
|
||||
public static function getMainCountry($date_from, $date_to)
|
||||
{
|
||||
$total_orders = AdminStatsController::getOrders($date_from, $date_to);
|
||||
@@ -581,8 +623,8 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
break;
|
||||
|
||||
case '8020_sales_catalog':
|
||||
$value = AdminStatsController::get8020SalesCatalog(date('Y-m-d', strtotime('-31 day')), date('Y-m-d', strtotime('-1 day')));
|
||||
$value .= ' '.$this->l('of your Catalog');
|
||||
$value = AdminStatsController::get8020SalesCatalog(date('Y-m-d', strtotime('-1 month')), date('Y-m-d'));
|
||||
$value = sprintf($this->l('%d%% of your Catalog'), $value);
|
||||
ConfigurationKPI::updateValue('8020_SALES_CATALOG', $value);
|
||||
ConfigurationKPI::updateValue('8020_SALES_CATALOG_EXPIRE', strtotime('+12 hour'));
|
||||
break;
|
||||
@@ -742,6 +784,27 @@ class AdminStatsControllerCore extends AdminStatsTabController
|
||||
ConfigurationKPI::updateValue('NETPROFIT_VISITOR', $value);
|
||||
ConfigurationKPI::updateValue('NETPROFIT_VISITOR_EXPIRE', strtotime(date('Y-m-d 00:00:00', strtotime('+1 day'))));
|
||||
break;
|
||||
|
||||
case 'products_per_category':
|
||||
$products = AdminStatsController::getTotalProducts();
|
||||
$categories = AdminStatsController::getTotalCategories();
|
||||
$value = round($products / $categories);
|
||||
ConfigurationKPI::updateValue('PRODUCTS_PER_CATEGORY', $value);
|
||||
ConfigurationKPI::updateValue('PRODUCTS_PER_CATEGORY_EXPIRE', strtotime('+1 hour'));
|
||||
break;
|
||||
|
||||
case 'top_category':
|
||||
if (!($id_category = AdminStatsController::getBestCategory(date('Y-m-d', strtotime('-1 month')), date('Y-m-d'))))
|
||||
$value = $this->l('No category');
|
||||
else
|
||||
{
|
||||
$category = new Category($id_category, $this->context->language->id);
|
||||
$value = $category->name;
|
||||
}
|
||||
|
||||
ConfigurationKPI::updateValue('TOP_CATEGORY', array($this->context->language->id => $value));
|
||||
ConfigurationKPI::updateValue('TOP_CATEGORY_EXPIRE', array($this->context->language->id => strtotime('+1 day')));
|
||||
break;
|
||||
|
||||
default:
|
||||
$value = false;
|
||||
|
||||
@@ -103,7 +103,7 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
|
||||
$action .= ($identifier && $id ? '&'.Tools::safeOutput($identifier).'='.(int)$id : '');
|
||||
$module = Tools::getValue('module');
|
||||
$action .= ($module ? '&module='.Tools::safeOutput($module) : '');
|
||||
$action .= ($id_product = Tools::getValue('id_product') ? '&id_product='.Tools::safeOutput($id_product) : '');
|
||||
$action .= (($id_product = Tools::getValue('id_product')) ? '&id_product='.Tools::safeOutput($id_product) : '');
|
||||
$tpl->assign(array(
|
||||
'current' => self::$currentIndex,
|
||||
'token' => $token,
|
||||
@@ -166,7 +166,7 @@ abstract class AdminStatsTabControllerCore extends AdminPreferencesControllerCor
|
||||
|
||||
$tpl->assign(array(
|
||||
'current' => self::$currentIndex,
|
||||
'current_module_name' => Tools::getValue('module'),
|
||||
'current_module_name' => Tools::getValue('module', 'statsforecast'),
|
||||
'token' => $this->token,
|
||||
'modules' => $modules,
|
||||
'module_instance' => $module_instance
|
||||
|
||||
@@ -154,6 +154,28 @@ class AdminTranslationsControllerCore extends AdminController
|
||||
return $this->{$method_name}();
|
||||
}
|
||||
|
||||
public function initPageHeaderToolbar()
|
||||
{
|
||||
parent::initPageHeaderToolbar();
|
||||
|
||||
if (Tools::getValue('lang'))
|
||||
{
|
||||
$this->page_header_toolbar_btn['save-and-stay'] = array(
|
||||
'short' => 'SaveAndStay',
|
||||
'href' => '#',
|
||||
'desc' => $this->l('Save and stay'),
|
||||
);
|
||||
$this->page_header_toolbar_btn['save'] = array(
|
||||
'href' => '#',
|
||||
'desc' => $this->l('Update translations')
|
||||
);
|
||||
$this->page_header_toolbar_btn['cancel'] = array(
|
||||
'href' => self::$currentIndex.'&token='.$this->token,
|
||||
'desc' => $this->l('Cancel')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* AdminController::initToolbar() override
|
||||
* @see AdminController::initToolbar()
|
||||
|
||||
@@ -26,4 +26,3 @@
|
||||
|
||||
require(dirname(__FILE__).'/config/config.inc.php');
|
||||
Dispatcher::getInstance()->dispatch();
|
||||
|
||||
|
||||
@@ -567,7 +567,7 @@
|
||||
<value>1</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STATS_RENDER" name="PS_STATS_RENDER">
|
||||
<value>graphxmlswfcharts</value>
|
||||
<value>graphnvd3</value>
|
||||
</configuration>
|
||||
<configuration id="PS_STATS_OLD_CONNECT_AUTO_CLEAN" name="PS_STATS_OLD_CONNECT_AUTO_CLEAN">
|
||||
<value>never</value>
|
||||
|
||||
@@ -538,10 +538,7 @@ class InstallModelInstall extends InstallAbstractModel
|
||||
'dashtrends',
|
||||
'dashgoals',
|
||||
'dashproducts',
|
||||
'graphartichow',
|
||||
'graphgooglechart',
|
||||
'graphvisifire',
|
||||
'graphxmlswfcharts',
|
||||
'graphnvd3',
|
||||
'gridhtml',
|
||||
'homefeatured',
|
||||
'homeslider',
|
||||
|
||||
@@ -208,16 +208,15 @@ function getBlogRss()
|
||||
},
|
||||
dataType: 'json',
|
||||
success : function(jsonData){
|
||||
if (!jsonData.has_errors)
|
||||
{
|
||||
for (var article in jsonData.rss)
|
||||
{
|
||||
article_html = '<article><strong>'+jsonData.rss[article].title+'</strong><br>'+jsonData.rss[article].short_desc+'<br/><a href="'+jsonData.rss[article].link+'">'+read_more+'</a></article><br>';
|
||||
$('.dash_news h4').after(article_html);
|
||||
if (!jsonData.has_errors) {
|
||||
for (var article in jsonData.rss) {
|
||||
article_html = '<article><h4><a href="'+jsonData.rss[article].link+'">'+jsonData.rss[article].title+'</a></h4><p>'+jsonData.rss[article].short_desc+' <a href="'+jsonData.rss[article].link+'">'+read_more+'</a><p></article><hr/>';
|
||||
$('.dash_news .dash_news_content').append(article_html);
|
||||
}
|
||||
}
|
||||
else
|
||||
else {
|
||||
$('.dash_news').hide();
|
||||
}
|
||||
},
|
||||
error : function(data){
|
||||
//@TODO display errors
|
||||
@@ -305,4 +304,4 @@ function preactivationLinkClick(module)
|
||||
//@TODO display errors
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,47 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span><br/>
|
||||
<span class="subtitle"><?php echo t('Thank you for creating a customer account at {shop_name}.'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Your {shop_name} login details'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Here are your login details:'); ?><br />
|
||||
<span><strong><?php echo t('E-mail address:'); ?> <a href="mailto:{email}">{email}</a></strong></span><br />
|
||||
<span><strong><?php echo t('Password:'); ?></strong></span> {passwd}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p><?php echo t('Important Security Tips:'); ?></p>
|
||||
<ol>
|
||||
<li><?php echo t('Always keep your account details safe.'); ?></li>
|
||||
<li><?php echo t('Never disclose your login details to anyone.'); ?></li>
|
||||
<li><?php echo t('Change your password regularly.'); ?></li>
|
||||
<li><?php echo t('Should you suspect someone is using your account illegally, please notify us immediately.'); ?></li>
|
||||
</ol>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span><?php echo t('You can now place orders on our shop:'); ?> <a href="{shop_url}">{shop_name}</a></span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('A new order has been generated on your behalf.'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Please go on <a href="{order_link}">{order_link}</a> to finalize the payment.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,57 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span><br/>
|
||||
<span class="subtitle"><?php echo t('Thank you for shopping with {shop_name}!'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Order {order_name}'); ?> - <?php echo t('Awaiting wire payment'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Your order with the reference <span><strong>{order_name}</strong></span> has been placed successfully and will be <strong>shipped as soon as we receive your payment</strong>.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('You have selected to pay by wire transfer.'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Here are the bank details for your transfer:'); ?><br />
|
||||
<span><strong><?php echo t('Amount:'); ?></strong></span> {total_paid}<br />
|
||||
<span><strong><?php echo t('Account owner:'); ?></strong></span> {bankwire_owner}<br />
|
||||
<span><strong><?php echo t('Account details:'); ?></strong></span> {bankwire_details}<br />
|
||||
<span><strong><?php echo t('Bank address:'); ?></strong></span> {bankwire_address}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('If you have a guest account, you can follow your order via the <a href="{guest_tracking_url}">"Guest Tracking"</a> section on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,58 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span><br/>
|
||||
<span class="subtitle"><?php echo t('Thank you for shopping with {shop_name}!'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Order {order_name}'); ?> - <?php echo t('Awaiting check payment'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Your order with the reference <span><strong>{order_name}</strong></span> has been placed successfully and will be <strong>shipped as soon as we receive your payment</strong>.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('You have selected to pay by check.'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Here are the bank details for your check:'); ?><br />
|
||||
<span><strong><?php echo t('Amount:'); ?></strong></span> {total_paid}<br />
|
||||
<span><strong><?php echo t('Payable to the order of:'); ?></strong></span> {cheque_name}<br />
|
||||
<span><strong><?php echo t('Please mail your check to:'); ?></strong></span> {cheque_address_html}
|
||||
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('If you have a guest account, you can follow your order via the <a href="{guest_tracking_url}">"Guest Tracking"</a> section on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,25 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Message from a {shop_name} customer'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<span><strong><?php echo t('Customer e-mail address:'); ?> <a href="mailto:{email}">{email}</a></strong></span><br /><br />
|
||||
<span><strong><?php echo t('Customer message:'); ?></strong></span> {message}<br /><br />
|
||||
<span><strong><?php echo t('Order ID:'); ?></strong></span> {order_name}<br />
|
||||
<span><strong><?php echo t('Attached file:'); ?></strong></span> {attached_file}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,36 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Your message to {shop_name} Customer Service'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Your message has been sent successfully.'); ?><br /><br />
|
||||
<span><strong><?php echo t('Message:'); ?></strong></span> {message}<br /><br />
|
||||
<span><strong><?php echo t('Order ID:'); ?></strong></span> {order_name}<br />
|
||||
<span><strong><?php echo t('Product:'); ?></strong></span> {product_name}<br />
|
||||
<span><strong><?php echo t('Attached file:'); ?></strong></span> {attached_file}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('We will answer as soon as possible.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,32 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Order {order_name}'); ?> - <?php echo t('Credit slip created'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('We have generated a credit slip in your name for order with the reference <span><strong>{order_name}</strong></span>.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review this credit slip and download your invoice from the <a href="{history_url}">"My credit slips"</a> section of your account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span><br/>
|
||||
<span class="subtitle"><?php echo t('Thank you for your order with the reference {order_name} from <strong>{shop_name}</strong>'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Product(s) now available for download'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('You have <span><strong>{nbProducts}</strong></span> product(s) now available for download using the following link(s):'); ?><br/><br/>
|
||||
{virtualProducts}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('If you have a guest account, you can follow your order via the <a href="{guest_tracking_url}?id_order={order_name}">"Guest Tracking"</a> section on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,26 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Your {shop_name} login information'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Here is your personal login information for <span><strong>{shop_name}</strong></span>:'); ?><br/><br/>
|
||||
<span><strong><?php echo t('First name:'); ?></strong></span> {firstname}<br />
|
||||
<span><strong><?php echo t('Last name:'); ?></strong></span> {lastname}<br />
|
||||
<span><strong><?php echo t('Password:'); ?></strong></span> {passwd}<br />
|
||||
<span><strong><?php echo t('E-mail address:'); ?></strong></span> {email}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,15 +0,0 @@
|
||||
<tr>
|
||||
<td class="space_footer"> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="footer">
|
||||
<span><?php echo t('<a href="{shop_url}">{shop_name}</a> powered by <a href="http://www.prestashop.com/">PrestaShop™</a>'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
<td class="space"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Customer service - Forwarded discussion'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('<span><strong>{employee}</strong></span> wanted to forward this discussion to you.'); ?> <br /><br />
|
||||
<span><strong><?php echo t('Discussion history:'); ?></strong></span> {messages}<br /><br />
|
||||
<?php echo t('<span><strong>{employee}</strong></span> added <span><strong>"{comment}"</strong></span>'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Your customer account creation'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Your guest account for <span><strong>{shop_name}</strong></span> has been transformed into a customer account.'); ?> <br /><br />
|
||||
<span><strong><?php echo t('E-mail address:'); ?></strong></span> {email}<br /><br />
|
||||
<span><strong><?php echo t('Password:'); ?></strong></span> {passwd}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('Please be careful when sharing these login details with others.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can access your customer account on our shop:'); ?> <strong>{shop_url}</strong>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,54 +0,0 @@
|
||||
<?php
|
||||
if(!function_exists('t'))
|
||||
{
|
||||
function t($str)
|
||||
{
|
||||
return $str;
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists('findRelativePathToAdminDir'))
|
||||
{
|
||||
function findRelativePathToAdminDir($maxDepth=5)
|
||||
{
|
||||
$path = '';
|
||||
for($i=0; $i<$maxDepth; $i++)
|
||||
{
|
||||
foreach(scandir(dirname(__FILE__).'/'.$path) as $dir)
|
||||
{
|
||||
$candidate = $path.$dir.'/';
|
||||
if(is_dir(dirname(__FILE__).'/'.$candidate.'tabs'))
|
||||
{
|
||||
return $candidate;
|
||||
}
|
||||
}
|
||||
$path .= '../';
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$admin = findRelativePathToAdminDir();
|
||||
?>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/strict.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<title><?php echo t('Message from {shop_name}'); ?></title>
|
||||
<link rel="stylesheet" type="text/css" href="<?php echo $admin ?>themes/default/css/admin-theme/email.css">
|
||||
</head>
|
||||
<body>
|
||||
<table class="table table-mail">
|
||||
<tr>
|
||||
<td class="space"> </td>
|
||||
<td align="center">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td align="center" class="logo">
|
||||
<a title="{shop_name}" href="{shop_url}">
|
||||
<img src="{shop_logo}" alt="{shop_name}" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Order {order_name}'); ?> - <?php echo t('In transit'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Your order with the reference <span><strong>{order_name}</strong></span> is currently in transit.'); ?> <br /><br />
|
||||
<?php echo t('You can track your package using the following link:'); ?> <a href="{followup}"><?php echo t('{followup}'); ?></a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('If you have a guest account, you can follow your order via the <a href="{guest_tracking_url}">"Guest Tracking"</a> section on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,23 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('You have received a new log alert'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('<span><strong>Warning:</strong></span> you have received a new log alert in your Back Office.'); ?><br /><br />
|
||||
<?php echo t('You can check for it in the <span><strong>"Tools" > "Logs"</strong></span> section of your Back Office.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,14 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
{message}
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Order {order_name}'); ?> - <?php echo t('Order cancelled'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Your order with the reference <span><strong>{order_name}</strong></span> from <span><strong>{shop_name}</strong></span> has been cancelled.'); ?><br />
|
||||
<?php echo t('You can check for it in the <span><strong>"Tools" > "Logs"</strong></span> section of your Back Office.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('If you have a guest account, you can follow your order via the <a href="{guest_tracking_url}">"Guest Tracking"</a> section on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Order {order_name}'); ?> - <?php echo t('Order changed'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Your order with the reference <span><strong>{order_name}</strong></span> from <span><strong>{shop_name}</strong></span> has been changed by the merchant.'); ?><br />
|
||||
<?php echo t('You can check for it in the <span><strong>"Tools" > "Logs"</strong></span> section of your Back Office.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('If you have a guest account, you can follow your order via the <a href="{guest_tracking_url}">"Guest Tracking"</a> section on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,131 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span><br/>
|
||||
<span class="subtitle"><?php echo t('Thank you for shopping with {shop_name}!'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box" colspan="3">
|
||||
<p>
|
||||
<?php echo t('Order details'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<span><strong><?php echo t('Order:'); ?></strong></span> {order_name} <?php echo t('Placed on'); ?> {date}<br /><br />
|
||||
<span><strong><?php echo t('Payment:'); ?></strong></span> {payment}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table table-recap" bgcolor="#ffffff"><!-- Title -->
|
||||
<thead>
|
||||
<tr>
|
||||
<th><?php echo t('Reference'); ?></th>
|
||||
<th width="30%"><?php echo t('Product'); ?></th>
|
||||
<th><?php echo t('Unit price'); ?></th>
|
||||
<th><?php echo t('Quantity'); ?></th>
|
||||
<th><?php echo t('Total price'); ?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
{products}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
{discounts}
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="conf_body">
|
||||
<td bgcolor="#fbfbfb" align="right" colspan="4"><strong><?php echo t('Products'); ?></strong></td>
|
||||
<td bgcolor="#fbfbfb" align="right">{total_products}</td>
|
||||
</tr>
|
||||
<tr class="conf_body">
|
||||
<td bgcolor="#fbfbfb" align="right" colspan="4"><strong><?php echo t('Discounts'); ?></strong></td>
|
||||
<td bgcolor="#fbfbfb" align="right">{total_discounts}</td>
|
||||
</tr>
|
||||
<tr class="conf_body">
|
||||
<td bgcolor="#fbfbfb" align="right" colspan="4"><strong><?php echo t('Gift-wrapping'); ?></strong></td>
|
||||
<td bgcolor="#fbfbfb" align="right">{total_wrapping}</td>
|
||||
</tr>
|
||||
<tr class="conf_body">
|
||||
<td bgcolor="#fbfbfb" align="right" colspan="4"><strong><?php echo t('Shipping'); ?></strong></td>
|
||||
<td bgcolor="#fbfbfb" align="right">{total_shipping}</td>
|
||||
</tr>
|
||||
<tr class="conf_body">
|
||||
<td bgcolor="#fbfbfb" align="right" colspan="4"><strong><?php echo t('Total Tax paid'); ?></strong></td>
|
||||
<td bgcolor="#fbfbfb" align="right">{total_tax_paid}</td>
|
||||
</tr>
|
||||
<tr class="conf_body">
|
||||
<td bgcolor="#fbfbfb" align="right" colspan="4" class="total"><strong><?php echo t('Total paid'); ?></strong></td>
|
||||
<td bgcolor="#fbfbfb" align="right" class="total_amount">{total_paid}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box" colspan="3">
|
||||
<p>
|
||||
<?php echo t('Shipping'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<span><strong><?php echo t('Carrier:'); ?></strong></span> {carrier}<br /><br />
|
||||
<span><strong><?php echo t('Payment:'); ?></strong></span> {payment}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td class="box" width="310">
|
||||
<p>
|
||||
<?php echo t('Delivery address'); ?>
|
||||
</p>
|
||||
<span>
|
||||
{delivery_block_html}
|
||||
</span>
|
||||
</td>
|
||||
<td width="20"> </td>
|
||||
<td class="box" width="310">
|
||||
<p>
|
||||
<?php echo t('Billing address'); ?>
|
||||
</p>
|
||||
<span>
|
||||
{invoice_block_html}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('If you have a guest account, you can follow your order via the <a href="{guest_tracking_url}">"Guest Tracking"</a> section on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center" colspan="3">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Message from a customer'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('You have received a new message regarding order with the reference'); ?> <span><strong>{order_name}</strong></span>.<br /><br />
|
||||
<span><strong><?php echo t('Customer:'); ?></strong></span> {firstname} {lastname} ({email})<br /><br />
|
||||
{message}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center" colspan="3">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Message from {shop_name}'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('You have received a new message from <span><strong>{shop_name}</strong></span> regarding order with the reference <span><strong>{order_name}</strong></span>.'); ?><br /><br />
|
||||
<span><strong><?php echo t('Message:'); ?></strong></span> {message}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center" colspan="3">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Return #{id_order_return} - update'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('We have updated the progress on your return #{id_order_return}, the new status is:'); ?> <span><strong>"{state_order_return}"</strong></span><br /><br />
|
||||
<span><strong><?php echo t('Message:'); ?></strong></span> {message}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span><br/>
|
||||
<span class="subtitle"><?php echo t('Thanks for your order with the reference {order_name} from {shop_name}.'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Order {order_name}'); ?> - <?php echo t('Item(s) out of stock'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Unfortunately, one or more items are currently out of stock. This may cause a slight delay in your delivery. Please accept our apologies and rest assured that we are working hard to rectify this.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('If you have a guest account, you can follow your order via the <a href="{guest_tracking_url}">"Guest Tracking"</a> section on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Your new {shop_name} login details'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<span><strong><?php echo t('E-mail address:'); ?></strong></span> {email}<br/>
|
||||
<span><strong><?php echo t('Password:'); ?></strong></span> {passwd}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('If you have a guest account, you can follow your order via the <a href="{guest_tracking_url}">"Guest Tracking"</a> section on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Password reset request for {shop_name}'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('You have requested to reset your <span><strong>{shop_name}</strong></span> login details.'); ?><br/><br/>
|
||||
<?php echo t('Please note that this will change your current password.'); ?><br/><br/>
|
||||
<?php echo t('To confirm this action, please use the following link:'); ?> <br /> <a href="{url}">{url}</a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span><br/>
|
||||
<span class="subtitle"><?php echo t('Thank you for shopping with {shop_name}!'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Order {order_name}'); ?> - <?php echo t('Payment processed'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Your payment for order with the reference <strong><span>{order_name}</span></strong> was successfully processed.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('If you have a guest account, you can follow your order via the <a href="{guest_tracking_url}">"Guest Tracking"</a> section on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Order {order_name}'); ?> - <?php echo t('Payment processing error'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('There is a problem with your payment for <strong><span>{shop_name}</span></strong> order with the reference <strong><span>{order_name}</span></strong>. Please contact us at your earliest convenience.'); ?><br/>
|
||||
<strong><span><?php echo t('We cannot ship your order until we receive your payment.'); ?></span></strong>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('If you have a guest account, you can follow your order via the <a href="{guest_tracking_url}">"Guest Tracking"</a> section on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Order {order_name}'); ?> - <?php echo t('Processing'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('We are currently processing your <strong><span>{shop_name}</span></strong> order with the reference <strong><span>{order_name}</span></strong>.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('If you have a guest account, you can follow your order via the <a href="{guest_tracking_url}">"Guest Tracking"</a> section on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,40 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Order {order_name}'); ?> - <?php echo t('Refund processed'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('We have processed your <strong><span>{shop_name}</span></strong> refund for order with the reference <strong><span>{order_name}</span></strong>.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('If you have a guest account, you can follow your order via the <a href="{guest_tracking_url}">"Guest Tracking"</a> section on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>{reply}</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can review your order and download your invoice from the <a href="{history_url}">"Order history"</a> section of your customer account by clicking <a href="{my_account_url}">"My account"</a> on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('If you have a guest account, you can follow your order via the <a href="{guest_tracking_url}">"Guest Tracking"</a> section on our shop.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,31 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span><br/>
|
||||
<span class="subtitle"><?php echo t('Thank you for shopping with {shop_name}!'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Order {order_name}'); ?> - <?php echo t('Shipped'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Your order with the reference <span><strong>{order_name}</strong></span> has been shipped.'); ?><br />
|
||||
<?php echo t('You will soon receive a URL to track the delivery progress of your package.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('You can now place orders on our shop:'); ?> <a href="{shop_url}">{shop_name}</a>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,19 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hello'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<span>
|
||||
<?php echo t('This is a <strong>test e-mail</strong> from your shop.<br /><br /> If you can read this, the test was successful!'); ?>.
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,24 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('Order {order_name}'); ?> - <?php echo t('Voucher created'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('A voucher has been created in your name as a result of your order with the reference <span><strong>{order_name}</strong></span>.'); ?><br/><br/>
|
||||
<?php echo t('<span><strong>Voucher code: {voucher_num}</strong></span> in the amount of <span><strong>{voucher_amount}</strong></span>'); ?><br /><br />
|
||||
<?php echo t('Simply copy/paste this code during the payment process for your next order.'); ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -1,22 +0,0 @@
|
||||
<?php include ('header.php'); ?>
|
||||
|
||||
<tr>
|
||||
<td align="center">
|
||||
<span class="title"><?php echo t('Hi {firstname} {lastname},'); ?></span>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="box">
|
||||
<p>
|
||||
<?php echo t('This is to inform you about the creation of a voucher.'); ?>
|
||||
</p>
|
||||
<span>
|
||||
<?php echo t('Here is the code of your voucher:'); ?> <span><strong>{voucher_num}</strong></span><br/><br/>
|
||||
<?php echo t('Simply copy/paste this code during the payment process for your next order.'); ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<?php include ('footer.php'); ?>
|
||||
@@ -123,14 +123,14 @@ class Dashactivity extends Module
|
||||
$sql = 'SELECT COUNT(DISTINCT c.id_connections)
|
||||
FROM `'._DB_PREFIX_.'connections` c
|
||||
LEFT JOIN `'._DB_PREFIX_.'connections_page` cp ON c.id_connections = cp.id_connections
|
||||
WHERE TIME_TO_SEC(TIMEDIFF(NOW(), cp.`time_start`)) < 900
|
||||
WHERE TIME_TO_SEC(TIMEDIFF(NOW(), cp.`time_start`)) < 1800
|
||||
AND cp.`time_end` IS NULL
|
||||
'.Shop::addSqlRestriction(false, 'c').'
|
||||
'.($maintenance_ips ? 'AND c.ip_address NOT IN ('.preg_replace('/[^,0-9]/', '', $maintenance_ips).')' : '');
|
||||
else
|
||||
$sql = 'SELECT COUNT(*)
|
||||
FROM `'._DB_PREFIX_.'connections`
|
||||
WHERE TIME_TO_SEC(TIMEDIFF(NOW(), `date_add`)) < 900
|
||||
WHERE TIME_TO_SEC(TIMEDIFF(NOW(), `date_add`)) < 1800
|
||||
'.Shop::addSqlRestriction(false).'
|
||||
'.($maintenance_ips ? 'AND ip_address NOT IN ('.preg_replace('/[^,0-9]/', '', $maintenance_ips).')' : '');
|
||||
$online_visitor = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue($sql);
|
||||
@@ -145,7 +145,7 @@ class Dashactivity extends Module
|
||||
$abandoned_cart = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT COUNT(*)
|
||||
FROM `'._DB_PREFIX_.'cart`
|
||||
WHERE `date_add` BETWEEN "'.pSQL($params['date_from']).'" AND "'.pSQL($params['date_to']).'"
|
||||
WHERE `date_upd` BETWEEN "'.pSQL(date('Y-m-d H:i:s', strtotime('-2 DAY'))).'" AND "'.pSQL(date('Y-m-d H:i:s', strtotime('-1 DAY'))).'"
|
||||
AND id_cart NOT IN (SELECT id_cart FROM `'._DB_PREFIX_.'orders`)
|
||||
'.Shop::addSqlRestriction(Shop::SHARE_ORDER));
|
||||
|
||||
@@ -157,18 +157,13 @@ class Dashactivity extends Module
|
||||
'.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o'));
|
||||
|
||||
$products_out_of_stock = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT COUNT(*)
|
||||
SELECT SUM(IF(IFNULL(stock.quantity, 0) > 0, 0, 1))
|
||||
FROM `'._DB_PREFIX_.'product` p
|
||||
'.Shop::addSqlAssociation('product', 'p').'
|
||||
'.Product::sqlStock('p').'
|
||||
WHERE IFNULL(stock.quantity, 0) <= 0');
|
||||
LEFT JOIN `'._DB_PREFIX_.'product_attribute` pa ON p.id_product = pa.id_product
|
||||
'.Product::sqlStock('p', 'pa'));
|
||||
|
||||
$new_messages = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT COUNT(*)
|
||||
FROM `'._DB_PREFIX_.'customer_thread` ct
|
||||
LEFT JOIN `'._DB_PREFIX_.'customer_message` cm ON ct.id_customer_thread = cm.id_customer_thread
|
||||
WHERE cm.`date_add` BETWEEN "'.pSQL($params['date_from']).'" AND "'.pSQL($params['date_to']).'"
|
||||
'.Shop::addSqlRestriction(false, 'ct'));
|
||||
$new_messages = AdminStatsController::getPendingMessages();
|
||||
|
||||
$active_shopping_cart = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('
|
||||
SELECT COUNT(*)
|
||||
@@ -278,7 +273,7 @@ class Dashactivity extends Module
|
||||
$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->ExecuteS('
|
||||
SELECT http_referer
|
||||
FROM '._DB_PREFIX_.'connections
|
||||
WHERE date_add BETWEEN '.$date_from.' AND '.$date_to.'
|
||||
WHERE date_add BETWEEN "'.$date_from.'" AND "'.$date_to.'"
|
||||
'.Shop::addSqlRestriction().'
|
||||
LIMIT '.(int)$limit);
|
||||
foreach ($result as $row)
|
||||
|
||||
@@ -183,10 +183,18 @@ class Dashproducts extends Module
|
||||
continue;
|
||||
$category = new Category($product_obj->getDefaultCategory(), $this->context->language->id);
|
||||
|
||||
$img = '';
|
||||
if (($row_image = Product::getCover($product_obj->id)) && $row_image['id_image'])
|
||||
{
|
||||
$image = new Image($row_image['id_image']);
|
||||
$path_to_image = _PS_PROD_IMG_DIR_.$image->getExistingImgPath().'.'.$this->context->controller->imageType;
|
||||
$img = ImageManager::thumbnail($path_to_image, 'product_mini_'.$product_obj->id.'.'.$this->context->controller->imageType, 45, $this->context->controller->imageType);
|
||||
}
|
||||
|
||||
$body[] = array(
|
||||
array(
|
||||
'id' => 'product',
|
||||
'value' => '<img src="'._PS_TMP_IMG_.'product_mini_'.$product['product_id'].'.jpg'.'" />',
|
||||
'value' => $img,
|
||||
'class' => 'text-center'
|
||||
),
|
||||
array(
|
||||
|
||||
@@ -101,7 +101,7 @@ class GridHtml extends ModuleGridEngine
|
||||
$.each(values, function(index, row){
|
||||
var newLine = "<tr>";';
|
||||
foreach ($params['columns'] as $column)
|
||||
$html .= ' newLine += "<td'.(isset($column['align']) ? ' class=\"'.$column['align'].'\"' : '').'>" + row["'.$column['dataIndex'].'"] + "</td>";';
|
||||
$html .= ' newLine += "<td'.(isset($column['align']) ? ' align=\"'.$column['align'].'\"' : '').'>" + row["'.$column['dataIndex'].'"] + "</td>";';
|
||||
if (!isset($params['defaultSortColumn']))
|
||||
$params['defaultSortColumn'] = false;
|
||||
if (!isset($params['defaultSortDirection']))
|
||||
|
||||
@@ -57,7 +57,7 @@ class StatsBestCategories extends ModuleGrid
|
||||
'id' => 'name',
|
||||
'header' => $this->l('Name'),
|
||||
'dataIndex' => 'name',
|
||||
'align' => 'center'
|
||||
'align' => 'left'
|
||||
),
|
||||
array(
|
||||
'id' => 'totalQuantitySold',
|
||||
@@ -69,7 +69,7 @@ class StatsBestCategories extends ModuleGrid
|
||||
'id' => 'totalPriceSold',
|
||||
'header' => $this->l('Total Price'),
|
||||
'dataIndex' => 'totalPriceSold',
|
||||
'align' => 'center'
|
||||
'align' => 'right'
|
||||
),
|
||||
array(
|
||||
'id' => 'totalPageViewed',
|
||||
@@ -105,7 +105,7 @@ class StatsBestCategories extends ModuleGrid
|
||||
|
||||
$this->_html = '
|
||||
<div class="panel-heading">
|
||||
'.$this->displayName.'
|
||||
<i class="icon-sitemap"></i> '.$this->displayName.'
|
||||
</div>
|
||||
'.$this->engine($engineParams).'
|
||||
<a class="btn btn-default export-csv" href="'.htmlentities($_SERVER['REQUEST_URI']).'&export=1">
|
||||
@@ -116,6 +116,7 @@ class StatsBestCategories extends ModuleGrid
|
||||
|
||||
public function getData()
|
||||
{
|
||||
$currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
|
||||
$dateBetween = $this->getDate();
|
||||
$id_lang = $this->getLang();
|
||||
|
||||
@@ -197,7 +198,10 @@ class StatsBestCategories extends ModuleGrid
|
||||
}
|
||||
if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit))
|
||||
$this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit);
|
||||
$this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query);
|
||||
$values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query);
|
||||
foreach ($values as &$value)
|
||||
$value['totalPriceSold'] = Tools::displayPrice($value['totalPriceSold'], $currency);
|
||||
$this->_values = $values;
|
||||
$this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT FOUND_ROWS()');
|
||||
}
|
||||
}
|
||||
@@ -57,13 +57,13 @@ class StatsBestProducts extends ModuleGrid
|
||||
'id' => 'reference',
|
||||
'header' => $this->l('Ref.'),
|
||||
'dataIndex' => 'reference',
|
||||
'align' => 'center'
|
||||
'align' => 'left'
|
||||
),
|
||||
array(
|
||||
'id' => 'name',
|
||||
'header' => $this->l('Name'),
|
||||
'dataIndex' => 'name',
|
||||
'align' => 'center'
|
||||
'align' => 'left'
|
||||
),
|
||||
array(
|
||||
'id' => 'totalQuantitySold',
|
||||
@@ -75,13 +75,13 @@ class StatsBestProducts extends ModuleGrid
|
||||
'id' => 'avgPriceSold',
|
||||
'header' => $this->l('Price sold'),
|
||||
'dataIndex' => 'avgPriceSold',
|
||||
'align' => 'center'
|
||||
'align' => 'right'
|
||||
),
|
||||
array(
|
||||
'id' => 'totalPriceSold',
|
||||
'header' => $this->l('Sales'),
|
||||
'dataIndex' => 'totalPriceSold',
|
||||
'align' => 'center'
|
||||
'align' => 'right'
|
||||
),
|
||||
array(
|
||||
'id' => 'averageQuantitySold',
|
||||
@@ -103,7 +103,7 @@ class StatsBestProducts extends ModuleGrid
|
||||
)
|
||||
);
|
||||
|
||||
$this->displayName = $this->l('Best-selling products.');
|
||||
$this->displayName = $this->l('Best-selling products');
|
||||
$this->description = $this->l('A list of the best-selling products.');
|
||||
}
|
||||
|
||||
@@ -140,6 +140,7 @@ class StatsBestProducts extends ModuleGrid
|
||||
|
||||
public function getData()
|
||||
{
|
||||
$currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
|
||||
$dateBetween = $this->getDate();
|
||||
$arrayDateBetween = explode(' AND ', $dateBetween);
|
||||
|
||||
@@ -178,7 +179,13 @@ class StatsBestProducts extends ModuleGrid
|
||||
|
||||
if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit))
|
||||
$this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit);
|
||||
$this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query);
|
||||
$values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query);
|
||||
foreach ($values as &$value)
|
||||
{
|
||||
$value['avgPriceSold'] = Tools::displayPrice($value['avgPriceSold'], $currency);
|
||||
$value['totalPriceSold'] = Tools::displayPrice($value['totalPriceSold'], $currency);
|
||||
}
|
||||
$this->_values = $values;
|
||||
$this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT FOUND_ROWS()');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,19 +57,19 @@ class StatsBestVouchers extends ModuleGrid
|
||||
'id' => 'code',
|
||||
'header' => $this->l('Code'),
|
||||
'dataIndex' => 'code',
|
||||
'align' => 'center'
|
||||
'align' => 'left'
|
||||
),
|
||||
array(
|
||||
'id' => 'name',
|
||||
'header' => $this->l('Name'),
|
||||
'dataIndex' => 'name',
|
||||
'align' => 'center'
|
||||
'align' => 'left'
|
||||
),
|
||||
array(
|
||||
'id' => 'ca',
|
||||
'header' => $this->l('Sales'),
|
||||
'dataIndex' => 'ca',
|
||||
'align' => 'center'
|
||||
'align' => 'right'
|
||||
),
|
||||
array(
|
||||
'id' => 'total',
|
||||
@@ -116,6 +116,7 @@ class StatsBestVouchers extends ModuleGrid
|
||||
|
||||
public function getData()
|
||||
{
|
||||
$currency = new Currency(Configuration::get('PS_CURRENCY_DEFAULT'));
|
||||
$this->_query = 'SELECT SQL_CALC_FOUND_ROWS cr.code, ocr.name, COUNT(ocr.id_cart_rule) as total, ROUND(SUM(o.total_paid_real) / o.conversion_rate,2) as ca
|
||||
FROM '._DB_PREFIX_.'order_cart_rule ocr
|
||||
LEFT JOIN '._DB_PREFIX_.'orders o ON o.id_order = ocr.id_order
|
||||
@@ -133,7 +134,10 @@ class StatsBestVouchers extends ModuleGrid
|
||||
if (($this->_start === 0 || Validate::IsUnsignedInt($this->_start)) && Validate::IsUnsignedInt($this->_limit))
|
||||
$this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit);
|
||||
|
||||
$this->_values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query);
|
||||
$values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->_query);
|
||||
foreach ($values as &$value)
|
||||
$value['ca'] = Tools::displayPrice($value['ca'], $currency);
|
||||
$this->_values = $values;
|
||||
$this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT FOUND_ROWS()');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,14 +48,14 @@ class StatsCheckUp extends Module
|
||||
public function install()
|
||||
{
|
||||
$confs = array(
|
||||
'CHECKUP_DESCRIPTIONS_LT'=>100,
|
||||
'CHECKUP_DESCRIPTIONS_GT'=>400,
|
||||
'CHECKUP_IMAGES_LT'=>1,
|
||||
'CHECKUP_IMAGES_GT'=>2,
|
||||
'CHECKUP_SALES_LT'=>1,
|
||||
'CHECKUP_SALES_GT'=>2,
|
||||
'CHECKUP_STOCK_LT'=>1,
|
||||
'CHECKUP_STOCK_GT'=>3
|
||||
'CHECKUP_DESCRIPTIONS_LT' => 100,
|
||||
'CHECKUP_DESCRIPTIONS_GT' => 400,
|
||||
'CHECKUP_IMAGES_LT' => 1,
|
||||
'CHECKUP_IMAGES_GT' => 2,
|
||||
'CHECKUP_SALES_LT' => 1,
|
||||
'CHECKUP_SALES_GT' => 2,
|
||||
'CHECKUP_STOCK_LT' => 1,
|
||||
'CHECKUP_STOCK_GT' => 3
|
||||
);
|
||||
foreach ($confs as $confname => $confdefault)
|
||||
if (!Configuration::get($confname))
|
||||
@@ -213,6 +213,7 @@ class StatsCheckUp extends Module
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div style="overflow-x:auto">
|
||||
<table class="table checkup2">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -318,7 +319,7 @@ class StatsCheckUp extends Module
|
||||
<td class="center">'.$arrayColors[$totals['average']].'</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>';
|
||||
</table></div>';
|
||||
|
||||
return $this->html;
|
||||
}
|
||||
|
||||
@@ -123,34 +123,34 @@ class StatsForecast extends Module
|
||||
$dataTable[$row['fix_date']] = $row;
|
||||
|
||||
$this->_html .= '<div>
|
||||
<div class="panel-heading">'.$this->displayName.'</div>
|
||||
<div class="panel-heading"><i class="icon-dashboard"></i> '.$this->displayName.'</div>
|
||||
<div class="alert alert-info">'.$this->l('All amounts listed do not include tax.').'</div>
|
||||
<form id="granularity" action="'.Tools::safeOutput($ru).'#granularity" method="post" class="form-horizontal">
|
||||
<div class="row row-margin-bottom">
|
||||
<label class="control-label col-lg-3">
|
||||
'.$this->l('Mode:').'
|
||||
'.$this->l('Display:').'
|
||||
</label>
|
||||
<div class="col-lg-6">
|
||||
<div class="col-lg-2">
|
||||
<input type="hidden" name="submitGranularity" value="1" />
|
||||
<select name="stats_granularity" onchange="this.form.submit();">
|
||||
<option value="10">'.$this->l('Day').'</option>
|
||||
<option value="42" '.($this->context->cookie->stats_granularity == '42' ? 'selected="selected"' : '').'>'.$this->l('Week').'</option>
|
||||
<option value="7" '.($this->context->cookie->stats_granularity == '7' ? 'selected="selected"' : '').'>'.$this->l('Month').'</option>
|
||||
<option value="4" '.($this->context->cookie->stats_granularity == '4' ? 'selected="selected"' : '').'>'.$this->l('Year').'</option>
|
||||
<option value="10">'.$this->l('Per Day').'</option>
|
||||
<option value="42" '.($this->context->cookie->stats_granularity == '42' ? 'selected="selected"' : '').'>'.$this->l('Per Week').'</option>
|
||||
<option value="7" '.($this->context->cookie->stats_granularity == '7' ? 'selected="selected"' : '').'>'.$this->l('Per Month').'</option>
|
||||
<option value="4" '.($this->context->cookie->stats_granularity == '4' ? 'selected="selected"' : '').'>'.$this->l('Per Year').'</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Visits').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Reg.').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Registrations').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('orders').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Items').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('% Reg.').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('% Registrations').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('% Orders').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Sales').'</span></th>
|
||||
</tr>
|
||||
@@ -189,7 +189,7 @@ class StatsForecast extends Module
|
||||
<td align="center">'.(int)($row['countProducts']).'</td>
|
||||
<td align="center">'.($visitsToday ? round(100 * (int)($row['registrations']) / $visitsToday, 2).' %' : '-').'</td>
|
||||
<td align="center">'.($visitsToday ? round(100 * (int)($row['countOrders']) / $visitsToday, 2).' %' : '-').'</td>
|
||||
<td align="right" >'.Tools::displayPrice($row['totalSales'], $currency).'</td>
|
||||
<td align="right">'.Tools::displayPrice($row['totalSales'], $currency).'</td>
|
||||
</tr>';
|
||||
|
||||
$this->t1 += $visitsToday;
|
||||
@@ -203,10 +203,10 @@ class StatsForecast extends Module
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Visits').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Reg.').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Registrations').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('orders').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Items').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('% Reg.').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('% Registrations').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('% Orders').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Sales').'</span></th>
|
||||
</tr>
|
||||
@@ -218,7 +218,7 @@ class StatsForecast extends Module
|
||||
<td class="center">'.(int)($this->t4).'</td>
|
||||
<td class="center">--</td>
|
||||
<td class="center">--</td>
|
||||
<td class="center">'.Tools::displayPrice($this->t8, $currency).'</td>
|
||||
<td align="right">'.Tools::displayPrice($this->t8, $currency).'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$this->l('Average').'</td>
|
||||
@@ -228,7 +228,7 @@ class StatsForecast extends Module
|
||||
<td class="center">'.(int)($this->t4 / $intervalAvg).'</td>
|
||||
<td class="center">'.($this->t1 ? round(100 * $this->t2 / $this->t1, 2) .' %' : '-').'</td>
|
||||
<td class="center">'.($this->t1 ? round(100 * $this->t3 / $this->t1, 2) .' %' : '-').'</td>
|
||||
<td class="center">'.Tools::displayPrice($this->t8 / $intervalAvg, $currency).'</td>
|
||||
<td align="right">'.Tools::displayPrice($this->t8 / $intervalAvg, $currency).'</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>'.$this->l('Forecast').'</td>
|
||||
@@ -238,7 +238,7 @@ class StatsForecast extends Module
|
||||
<td class="center">'.(int)($this->t4 * $prop30).'</td>
|
||||
<td class="center">--</td>
|
||||
<td class="center"class="center">--</td>
|
||||
<td class="center">'.Tools::displayPrice($this->t8 * $prop30, $currency).'</td>
|
||||
<td align="right">'.Tools::displayPrice($this->t8 * $prop30, $currency).'</td>
|
||||
</tr>
|
||||
</table>';
|
||||
|
||||
@@ -286,7 +286,7 @@ class StatsForecast extends Module
|
||||
|
||||
$this->_html .= '
|
||||
<div class="row row-margin-bottom">
|
||||
<h4>'.$this->l('Conversion').'</h4>
|
||||
<h4><i class="icon-filter"></i> '.$this->l('Conversion').'</h4>
|
||||
</div>
|
||||
<div class="row row-margin-bottom">
|
||||
<table class="table">
|
||||
@@ -382,7 +382,7 @@ class StatsForecast extends Module
|
||||
|
||||
$this->_html .= '
|
||||
<div class="row row-margin-bottom">
|
||||
<h4>'.$this->l('Payment distribution').'</h4>
|
||||
<h4><i class="icon-money"></i> '.$this->l('Payment distribution').'</h4>
|
||||
<div class="alert alert-info">'
|
||||
.$this->l('The amounts are with taxes, so you can get an estimation of the commission due to the payment method.').'
|
||||
</div>
|
||||
@@ -391,7 +391,7 @@ class StatsForecast extends Module
|
||||
<label class="control-label col-lg-3">
|
||||
'.$this->l('Zone:').'
|
||||
</label>
|
||||
<div class="col-lg-6">
|
||||
<div class="col-lg-3">
|
||||
<input type="hidden" name="submitIdZone" value="1" />
|
||||
<select name="stats_id_zone" onchange="this.form.submit();">
|
||||
<option value="0">'.$this->l('-- No filter --').'</option>';
|
||||
@@ -406,9 +406,9 @@ class StatsForecast extends Module
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Module').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Count').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Transactions').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Total').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Cart').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Average Cart Value').'</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
@@ -417,21 +417,21 @@ class StatsForecast extends Module
|
||||
<tr>
|
||||
<td class="center">'.$payment['payment_method'].'</td>
|
||||
<td class="center">'.(int)$payment['nb'].'</td>
|
||||
<td class="center">'.Tools::displayPrice($payment['total'], $currency).'</td>
|
||||
<td class="center">'.Tools::displayPrice($payment['cart'], $currency).'</td>
|
||||
<td align="right">'.Tools::displayPrice($payment['total'], $currency).'</td>
|
||||
<td align="right">'.Tools::displayPrice($payment['cart'], $currency).'</td>
|
||||
</tr>';
|
||||
$this->_html .= '
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row row-margin-bottom">
|
||||
<h4>'.$this->l('Category distribution').'</h4>
|
||||
<h4><i class="icon-sitemap"></i> '.$this->l('Category distribution').'</h4>
|
||||
<form id="cat" action="'.$ru.'#cat" method="post" class="form-horizontal">
|
||||
<div class="row row-margin-bottom">
|
||||
<label class="control-label col-lg-3">
|
||||
'.$this->l('Zone:').'
|
||||
</label>
|
||||
<div class="col-lg-6">
|
||||
<div class="col-lg-3">
|
||||
<input type="hidden" name="submitIdZone" value="1" />
|
||||
<select name="stats_id_zone" onchange="this.form.submit();">
|
||||
<option value="0">'.$this->l('-- No filter --').'</option>';
|
||||
@@ -446,11 +446,11 @@ class StatsForecast extends Module
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Category').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Count').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Products Sold').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Sales').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('% Count').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('% Sales').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Avgerage price').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Average price').'</span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
@@ -459,21 +459,21 @@ class StatsForecast extends Module
|
||||
<tr>
|
||||
<td class="center">'.(empty($catrow['name']) ? $this->l('Unknown') : $catrow['name']).'</td>
|
||||
<td class="center">'.$catrow['orderQty'].'</td>
|
||||
<td class="center">'.Tools::displayPrice($catrow['orderSum'], $currency).'</td>
|
||||
<td align="right">'.Tools::displayPrice($catrow['orderSum'], $currency).'</td>
|
||||
<td class="center">'.number_format((100 * $catrow['orderQty'] / $this->t4), 1, '.', ' ').'%</td>
|
||||
<td class="center">'.((int)$ca['ventil']['total'] ? number_format((100 * $catrow['orderSum'] / $ca['ventil']['total']), 1, '.', ' ') : '0').'%</td>
|
||||
<td class="center">'.Tools::displayPrice($catrow['priveAvg'], $currency).'</td>
|
||||
<td align="right">'.Tools::displayPrice($catrow['priveAvg'], $currency).'</td>
|
||||
</tr>';
|
||||
$this->_html .= '
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row row-margin-bottom">
|
||||
<h4>'.$this->l('Language distribution').'</h4>
|
||||
<h4><i class="icon-flag"></i> '.$this->l('Language distribution').'</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="center"><span class="title_box active">'.$this->l('customers').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Language').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Sales').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('%').'</span></th>
|
||||
<th class="center" colspan="2"><span class="title_box active">'.$this->l('Growth').'</span></th>
|
||||
@@ -486,7 +486,7 @@ class StatsForecast extends Module
|
||||
$this->_html .= '
|
||||
<tr '.(($percent < 0) ? 'class="alt_row"' : '').'>
|
||||
<td class="center">'.$ophone.'</td>
|
||||
<td class="center">'.Tools::displayPrice($amount, $currency).'</td>
|
||||
<td align="right">'.Tools::displayPrice($amount, $currency).'</td>
|
||||
<td class="center">'.((int)$ca['ventil']['total'] ? number_format((100 * $amount / $ca['ventil']['total']), 1, '.', ' ').'%' : '-').'</td>
|
||||
<td class="center">'.(($percent > 0 OR $percent == '∞') ? '<img src="../img/admin/arrow_up.png" />' : '<img src="../img/admin/arrow_down.png" /> ').'</td>
|
||||
<td class="center">'.(($percent > 0 OR $percent == '∞') ? '+' : '').$percent.'%</td>
|
||||
@@ -497,7 +497,7 @@ class StatsForecast extends Module
|
||||
</table>
|
||||
</div>
|
||||
<div class="row row-margin-bottom">
|
||||
<h4>'.$this->l('Zone distribution').'</h4>
|
||||
<h4><i class="icon-map-marker"></i> '.$this->l('Zone distribution').'</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -514,7 +514,7 @@ class StatsForecast extends Module
|
||||
<tr>
|
||||
<td class="center">'.(isset($zone['name']) ? $zone['name'] : $this->l('Undefined')).'</td>
|
||||
<td class="center">'.(int)($zone['nb']).'</td>
|
||||
<td class="center">'.Tools::displayPrice($zone['total'], $currency).'</td>
|
||||
<td align="right">'.Tools::displayPrice($zone['total'], $currency).'</td>
|
||||
<td class="center">'.($ca['ventil']['nb'] ? number_format((100 * $zone['nb'] / $ca['ventil']['nb']), 1, '.', ' ') : '0').'%</td>
|
||||
<td class="center">'.((int)$ca['ventil']['total'] ? number_format((100 * $zone['total'] / $ca['ventil']['total']), 1, '.', ' ') : '0').'%</td>
|
||||
</tr>';
|
||||
@@ -523,13 +523,13 @@ class StatsForecast extends Module
|
||||
</table>
|
||||
</div>
|
||||
<div class="row row-margin-bottom">
|
||||
<h4>'.$this->l('Currency distribution').'</h4>
|
||||
<h4><i class="icon-money"></i> '.$this->l('Currency distribution').'</h4>
|
||||
<form id="cat" action="'.$ru.'#currencies" method="post" class="form-horizontal">
|
||||
<div class="row row-margin-bottom">
|
||||
<label class="control-label col-lg-3">
|
||||
'.$this->l('Zone:').'
|
||||
</label>
|
||||
<div class="col-lg-6">
|
||||
<div class="col-lg-3">
|
||||
<input type="hidden" name="submitIdZone" value="1" />
|
||||
<select name="stats_id_zone" onchange="this.form.submit();">
|
||||
<option value="0">'.$this->l('-- No filter --').'</option>';
|
||||
@@ -545,7 +545,7 @@ class StatsForecast extends Module
|
||||
<tr>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Currency').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Count').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('Sales (converted)').'</span></th>
|
||||
<th align="right"><span class="title_box active">'.$this->l('Sales (converted)').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('% Count').'</span></th>
|
||||
<th class="center"><span class="title_box active">'.$this->l('% Sales').'</span></th>
|
||||
</tr>
|
||||
@@ -556,7 +556,7 @@ class StatsForecast extends Module
|
||||
<tr>
|
||||
<td class="center">'.$currencyRow['name'].'</td>
|
||||
<td class="center">'.(int)($currencyRow['nb']).'</td>
|
||||
<td class="center">'.Tools::displayPrice($currencyRow['total'], $currency).'</td>
|
||||
<td align="right">'.Tools::displayPrice($currencyRow['total'], $currency).'</td>
|
||||
<td class="center">'.($ca['ventil']['nb'] ? number_format((100 * $currencyRow['nb'] / $ca['ventil']['nb']), 1, '.', ' ') : '0').'%</td>
|
||||
<td class="center">'.((int)$ca['ventil']['total'] ? number_format((100 * $currencyRow['total'] / $ca['ventil']['total']), 1, '.', ' ') : '0').'%</td>
|
||||
</tr>';
|
||||
@@ -565,7 +565,7 @@ class StatsForecast extends Module
|
||||
</table>
|
||||
</div>
|
||||
<div class="row row-margin-bottom">
|
||||
<h4>'.$this->l('Attribute distribution').'</h4>
|
||||
<h4><i class="icon-ticket"></i> '.$this->l('Attribute distribution').'</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
@@ -75,7 +75,8 @@ class StatsPersonalInfos extends ModuleGraph
|
||||
</ul>
|
||||
</p>
|
||||
</div>';
|
||||
if (count(Customer::getCustomers()))
|
||||
$has_customers = (bool)Db::getInstance()->getValue('SELECT id_customer FROM '._DB_PREFIX_.'customer');
|
||||
if ($has_customers)
|
||||
{
|
||||
if (Tools::getValue('export'))
|
||||
if (Tools::getValue('exportType') == 'gender')
|
||||
|
||||
@@ -41,7 +41,7 @@ class StatsStock extends Module
|
||||
|
||||
parent::__construct();
|
||||
|
||||
$this->displayName = $this->l('Stats on available quantities.');
|
||||
$this->displayName = $this->l('Stats on available quantities');
|
||||
$this->description = '';
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ class StatsStock extends Module
|
||||
<tr>
|
||||
<th colspan="3"></th>
|
||||
<th><span class="title_box active">'.$this->l('Total quantities').'</span></th>
|
||||
<th><span class="title_box active">'.$this->l('Avg price').'</span></th>
|
||||
<th><span class="title_box active">'.$this->l('Average price').'</span></th>
|
||||
<th><span class="title_box active">'.$this->l('Total value').'</span></th>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
Reference in New Issue
Block a user