diff --git a/modules/statsforecast/statsforecast.php b/modules/statsforecast/statsforecast.php index ddd93c921..e0a24a271 100644 --- a/modules/statsforecast/statsforecast.php +++ b/modules/statsforecast/statsforecast.php @@ -123,30 +123,38 @@ class StatsForecast extends Module $dataTable[$row['fix_date']] = $row; $this->_html .= '
'.$this->l('All amounts listed do not include tax.').'
- -| - | '.$this->l('Visits').' | -'.$this->l('Reg.').' | -'.$this->l('orders').' | -'.$this->l('Items').' | -'.$this->l('% Reg.').' | -'.$this->l('% Orders').' | -'.$this->l('Sales').' | -
|---|
| + | '.$this->l('Visits').' | +'.$this->l('Reg.').' | +'.$this->l('orders').' | +'.$this->l('Items').' | +'.$this->l('% Reg.').' | +'.$this->l('% Orders').' | +'.$this->l('Sales').' | +||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| - | '.$this->l('Visits').' | -'.$this->l('Reg.').' | -'.$this->l('orders').' | -'.$this->l('Items').' | -'.$this->l('% Reg.').' | -'.$this->l('% Orders').' | -'.$this->l('Sales').' | ++ | '.$this->l('Visits').' | +'.$this->l('Reg.').' | +'.$this->l('orders').' | +'.$this->l('Items').' | +'.$this->l('% Reg.').' | +'.$this->l('% Orders').' | +'.$this->l('Sales').' |
| '.$this->l('Total').' | -'.(int)($this->t1).' | -'.(int)($this->t2).' | -'.(int)($this->t3).' | -'.(int)($this->t4).' | --- | --- | -'.Tools::displayPrice($this->t8, $currency).' | +'.$this->l('Total').' | +'.(int)($this->t1).' | +'.(int)($this->t2).' | +'.(int)($this->t3).' | +'.(int)($this->t4).' | +-- | +-- | +'.Tools::displayPrice($this->t8, $currency).' |
| '.$this->l('Average').' | -'.(int)($this->t1 / $intervalAvg).' | -'.(int)($this->t2 / $intervalAvg).' | -'.(int)($this->t3 / $intervalAvg).' | -'.(int)($this->t4 / $intervalAvg).' | -'.($this->t1 ? round(100 * $this->t2 / $this->t1, 2) .' %' : '-').' | -'.($this->t1 ? round(100 * $this->t3 / $this->t1, 2) .' %' : '-').' | -'.Tools::displayPrice($this->t8 / $intervalAvg, $currency).' | +'.$this->l('Average').' | +'.(int)($this->t1 / $intervalAvg).' | +'.(int)($this->t2 / $intervalAvg).' | +'.(int)($this->t3 / $intervalAvg).' | +'.(int)($this->t4 / $intervalAvg).' | +'.($this->t1 ? round(100 * $this->t2 / $this->t1, 2) .' %' : '-').' | +'.($this->t1 ? round(100 * $this->t3 / $this->t1, 2) .' %' : '-').' | +'.Tools::displayPrice($this->t8 / $intervalAvg, $currency).' |
| '.$this->l('Forecast').' | -'.(int)($this->t1 * $prop30).' | -'.(int)($this->t2 * $prop30).' | -'.(int)($this->t3 * $prop30).' | -'.(int)($this->t4 * $prop30).' | --- | --- | -'.Tools::displayPrice($this->t8 * $prop30, $currency).' | +'.$this->l('Forecast').' | +'.(int)($this->t1 * $prop30).' | +'.(int)($this->t2 * $prop30).' | +'.(int)($this->t3 * $prop30).' | +'.(int)($this->t4 * $prop30).' | +-- | +-- | +'.Tools::displayPrice($this->t8 * $prop30, $currency).' |





'.round(100 * $orders / max(1, $customers), 2).' %
-
- '.$this->l('orders').'
-
'.round(100 * $orders / max(1, $visitors), 2).' %
-
- '.$this->l('orders').'
-
- '.$this->l('Turn your visitors into money:').'
-
'.$this->l('Each visitor yields').' '.Tools::displayPrice($ca['ventil']['total'] / max(1, $visitors), $currency).'.
-
'.$this->l('Each registered visitor yields').' '.Tools::displayPrice($ca['ventil']['total'] / max(1, $customers), $currency).'.
+ $this->_html .= '
+
|
+ '.$this->l('Visitors').' +'.$visitors.' + |
+
+ + '.round(100 * $customers / max(1, $visitors)).' % + |
+
+ '.$this->l('Accounts').' +'.$customers.' + |
+
+ + '.round(100 * $fullcarts / max(1, $customers)).' % + |
+
+ '.$this->l('Full carts').' +'.$fullcarts.' + |
+
+ + '.round(100 * $orders / max(1, $fullcarts)).' % + |
+
+ '.$this->l('orders').' +'.$orders.' + |
+
+ '.$this->l('Registered visitors').' + |
+ + + | +
+ '.round(100 * $orders / max(1, $customers), 2).' % + |
+ + + | +
+ '.$this->l('orders').' + |
+
+ '.$this->l('Visitors').' + |
+ + + | +
+ '.round(100 * $orders / max(1, $visitors), 2).' % + |
+ + + | +
+ '.$this->l('orders').' + |
+
|
+ + '.round(100 * $carts / max(1, $visitors)).' % + |
+
+ '.$this->l('Carts').' +'.$carts.' + |
+
+ + '.round(100 * $fullcarts / max(1, $carts)).' % + |
+
'.$this->l('Turn your visitors into money:').'
+'.$this->l('Each visitor yields').' '.Tools::displayPrice($ca['ventil']['total'] / max(1, $visitors), $currency).'.
+'.$this->l('Each registered visitor yields').' '.Tools::displayPrice($ca['ventil']['total'] / max(1, $customers), $currency).'.
'.$this->l('The amounts are with taxes, so you can get an estimation of the commission due to the payment method.').'
- -| '.$this->l('Module').' | '.$this->l('Count').' | '.$this->l('Total').' | '.$this->l('Cart').' | |||||
|---|---|---|---|---|---|---|---|---|
| '.$this->l('Module').' | +'.$this->l('Count').' | +'.$this->l('Total').' | +'.$this->l('Cart').' | +
|---|---|---|---|
| '.$payment['payment_method'].' | +'.(int)$payment['nb'].' | +'.Tools::displayPrice($payment['total'], $currency).' | +'.Tools::displayPrice($payment['cart'], $currency).' | +
| '.$this->l('Category').' | +'.$this->l('Count').' | +'.$this->l('Sales').' | +'.$this->l('% Count').' | +'.$this->l('% Sales').' | +'.$this->l('Avgerage price').' | +
|---|---|---|---|---|---|
| '.(empty($catrow['name']) ? $this->l('Unknown') : $catrow['name']).' | +'.$catrow['orderQty'].' | +'.Tools::displayPrice($catrow['orderSum'], $currency).' | +'.number_format((100 * $catrow['orderQty'] / $this->t4), 1, '.', ' ').'% | +'.((int)$ca['ventil']['total'] ? number_format((100 * $catrow['orderSum'] / $ca['ventil']['total']), 1, '.', ' ') : '0').'% | +'.Tools::displayPrice($catrow['priveAvg'], $currency).' | +
| '.$this->l('customers').' | +'.$this->l('Sales').' | +'.$this->l('%').' | +'.$this->l('Growth').' | +|
|---|---|---|---|---|
| '.$ophone.' | +'.Tools::displayPrice($amount, $currency).' | +'.((int)$ca['ventil']['total'] ? number_format((100 * $amount / $ca['ventil']['total']), 1, '.', ' ').'%' : '-').' | +'.(($percent > 0 OR $percent == '∞') ? ' ' : ' ').' |
+ '.(($percent > 0 OR $percent == '∞') ? '+' : '').$percent.'% | +
| '.$this->l('Zone').' | +'.$this->l('Count').' | +'.$this->l('Total').' | +'.$this->l('% Count').' | +'.$this->l('% Sales').' | +||||
|---|---|---|---|---|---|---|---|---|
| '.$payment['payment_method'].' | -'.(int)$payment['nb'].' | -'.Tools::displayPrice($payment['total'], $currency).' | -'.Tools::displayPrice($payment['cart'], $currency).' | +'.(isset($zone['name']) ? $zone['name'] : $this->l('Undefined')).' | +'.(int)($zone['nb']).' | +'.Tools::displayPrice($zone['total'], $currency).' | +'.($ca['ventil']['nb'] ? number_format((100 * $zone['nb'] / $ca['ventil']['nb']), 1, '.', ' ') : '0').'% | +'.((int)$ca['ventil']['total'] ? number_format((100 * $zone['total'] / $ca['ventil']['total']), 1, '.', ' ') : '0').'% |
| '.$this->l('Category').' | '.$this->l('Count').' | '.$this->l('Sales').' | '.$this->l('% Count').' | '.$this->l('% Sales').' | '.$this->l('Avgerage price').' |
|---|
| '.$this->l('Currency').' | +'.$this->l('Count').' | +'.$this->l('Sales (converted)').' | +'.$this->l('% Count').' | +'.$this->l('% Sales').' | +|
|---|---|---|---|---|---|
| '.$currencyRow['name'].' | +'.(int)($currencyRow['nb']).' | +'.Tools::displayPrice($currencyRow['total'], $currency).' | +'.($ca['ventil']['nb'] ? number_format((100 * $currencyRow['nb'] / $ca['ventil']['nb']), 1, '.', ' ') : '0').'% | +'.((int)$ca['ventil']['total'] ? number_format((100 * $currencyRow['total'] / $ca['ventil']['total']), 1, '.', ' ') : '0').'% | +|
| '.(empty($catrow['name']) ? $this->l('Unknown') : $catrow['name']).' | -'.$catrow['orderQty'].' | -'.Tools::displayPrice($catrow['orderSum'], $currency).' | -'.number_format((100 * $catrow['orderQty'] / $this->t4), 1, '.', ' ').'% | -'.((int)$ca['ventil']['total'] ? number_format((100 * $catrow['orderSum'] / $ca['ventil']['total']), 1, '.', ' ') : '0').'% | -'.Tools::displayPrice($catrow['priveAvg'], $currency).' | -
| '.$this->l('customers').' | '.$this->l('Sales').' | '.$this->l('%').' | '.$this->l('Growth').' | |
|---|---|---|---|---|
| '.$ophone.' | -'.Tools::displayPrice($amount, $currency).' | -'.((int)$ca['ventil']['total'] ? number_format((100 * $amount / $ca['ventil']['total']), 1, '.', ' ').'%' : '-').' | -'.(($percent > 0 OR $percent == '∞') ? ' ' : ' ').' |
- '.(($percent > 0 OR $percent == '∞') ? '+' : '').$percent.'% | -
| '.$this->l('Zone').' | '.$this->l('Count').' | '.$this->l('Total').' | '.$this->l('% Count').' | '.$this->l('% Sales').' |
|---|---|---|---|---|
| '.(isset($zone['name']) ? $zone['name'] : $this->l('Undefined')).' | -'.(int)($zone['nb']).' | -'.Tools::displayPrice($zone['total'], $currency).' | -'.($ca['ventil']['nb'] ? number_format((100 * $zone['nb'] / $ca['ventil']['nb']), 1, '.', ' ') : '0').'% | -'.((int)$ca['ventil']['total'] ? number_format((100 * $zone['total'] / $ca['ventil']['total']), 1, '.', ' ') : '0').'% | -
| '.$this->l('Currency').' | '.$this->l('Count').' | '.$this->l('Sales (converted)').' | '.$this->l('% Count').' | '.$this->l('% Sales').' |
|---|
| '.$this->l('Group').' | +'.$this->l('Attribute').' | +'.$this->l('Count').' | +||
|---|---|---|---|---|
| '.$attribut['gname'].' | +'.$attribut['aname'].' | +'.(int)($attribut['total']).' | +||
| '.$currencyRow['name'].' | -'.(int)($currencyRow['nb']).' | -'.Tools::displayPrice($currencyRow['total'], $currency).' | -'.($ca['ventil']['nb'] ? number_format((100 * $currencyRow['nb'] / $ca['ventil']['nb']), 1, '.', ' ') : '0').'% | -'.((int)$ca['ventil']['total'] ? number_format((100 * $currencyRow['total'] / $ca['ventil']['total']), 1, '.', ' ') : '0').'% | -
| '.$this->l('Group').' | '.$this->l('Attribute').' | '.$this->l('Count').' |
|---|---|---|
| '.$attribut['gname'].' | -'.$attribut['aname'].' | -'.(int)($attribut['total']).' | -
'.$this->l('There are no visitors online.').'
+'.$this->l('Maintenance IP(s) are excluded from the online visitors.').'
+ + '.$this->l('Add or remove an IP address.').' + + '; return $this->html; } diff --git a/modules/statsvisits/statsvisits.php b/modules/statsvisits/statsvisits.php index c9f7d244f..caaa34156 100644 --- a/modules/statsvisits/statsvisits.php +++ b/modules/statsvisits/statsvisits.php @@ -84,26 +84,44 @@ class StatsVisits extends ModuleGraph if (Tools::getValue('export')) $this->csvExport(array('layers' => 2, 'type' => 'line', 'option' => 3)); $this->html = ' -
-
'.$this->l('A visit corresponds to an internet user coming to your shop, and until the end of their session, only one visit is counted.').'
- '.$this->l('A visitor is an unknown person who has not registered or logged into your store. A visitor can also be considered a person who has visited your shop multiple times.').'
-
'.$this->l('Total visits:').' '.$totalVisits.'
-'.$this->l('Total visitors:').' '.$totalGuests.'
- '.($totalVisits ? $this->engine($graphParams).'' : '').' +
+ '.$this->l('The visitors\' evolution graph strongly resembles the visits\' graph, but provides additional information:').'
+
+ '.$this->l('This information is mostly qualitative. It is up to you to determine the interest of a disjointed visit.').' +
+