'.$this->l('You must enable the "Save global page views" option from ').'Data mining for statistics'.$this->l(' module in order to display the most viewed room types, or use the Google Analytics module.').'
';
+ $body = '
'.$this->l('You must enable the "Save global page views" option from ').'Data mining for statistics'.$this->l(' module in order to display the most viewed room types, or use the QloApps Google Analytics module.').'
'.$this->l('You must enable the "Save global page views" option from ').'Data mining for statistics'.$this->l(' module in order to display the most viewed room types, or use the Google Analytics module.').'
';
+ $body = '
'.$this->l('You must enable the "Save global page views" option from ').'Data mining for statistics'.$this->l(' module in order to display the most viewed room types, or use the QloApps Google Analytics module.').'
';
}
return array('header' => $header, 'body' => $body);
@@ -542,16 +543,17 @@ class DashProducts extends Module
public function getTotalViewed($date_from, $date_to, $limit = 10)
{
- $gapi = Module::isInstalled('gapi') ? Module::getInstanceByName('gapi') : false;
- if (Validate::isLoadedObject($gapi) && $gapi->isConfigured()) {
+ $objQGA = Module::isEnabled('qlogoogleanalytics') ? Module::getInstanceByName('qlogoogleanalytics') : false;
+ if (Validate::isLoadedObject($objQGA) && $objQGA->isConfigured()) {
$products = array();
// Only works with the default product URL pattern at this time
- if ($result = $gapi->requestReportData('ga:pagePath', 'ga:visits', $date_from, $date_to, '-ga:visits', 'ga:pagePath=~/([a-z]{2}/)?([a-z]+/)?[0-9][0-9]*\-.*\.html$', 1, 10))
- foreach ($result as $row)
- {
- if (preg_match('@/([a-z]{2}/)?([a-z]+/)?([0-9]+)\-.*\.html$@', $row['dimensions']['pagePath'], $matches))
+ if ($result = $objQGA->requestReportData('ga:pagePath', 'ga:visits', $date_from, $date_to, '-ga:visits', 'ga:pagePath=~/([a-z]{2}/)?([a-z]+/)?[0-9][0-9]*\-.*\.html$', 1, $limit)) {
+ foreach ($result as $row) {
+ if (preg_match('@/([a-z]{2}/)?([a-z]+/)?([0-9]+)\-.*\.html@', $row['dimensions']['pagePath'], $matches)) {
$products[] = array('id_object' => (int)$matches[3], 'counter' => $row['metrics']['visits']);
+ }
}
+ }
return $products;
} else {
@@ -579,14 +581,13 @@ class DashProducts extends Module
return array();
}
- $pageType = Page::getPageTypeByName('category');
return Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS(
'SELECT hbi.`id` AS `id_hotel`, cl.`name` AS `hotel_name`, pv.`counter` AS `views`
FROM `'._DB_PREFIX_.'page_viewed` pv
LEFT JOIN `'._DB_PREFIX_.'page` p ON (p.`id_page` = pv.`id_page`)
LEFT JOIN `'._DB_PREFIX_.'page_type` pt ON (pt.`id_page_type` = p.`id_page_type`)
LEFT JOIN `'._DB_PREFIX_.'category_lang` cl ON (cl.`id_category` = p.`id_object`)
- LEFT JOIN `'._DB_PREFIX_.'htl_branch_info` hbi ON (hbi.`id_category` = hbi.`id_category`)
+ LEFT JOIN `'._DB_PREFIX_.'htl_branch_info` hbi ON (hbi.`id_category` = cl.`id_category`)
LEFT JOIN `'._DB_PREFIX_.'date_range` dr ON (pv.`id_date_range` = dr.`id_date_range`)
WHERE pt.`name` = "'.pSQL('category').'"
AND dr.`time_start` BETWEEN "'.pSQL($date_from).' 00:00:00" AND "'.pSQL($date_to).' 23:59:59"
diff --git a/modules/dashtrends/dashtrends.php b/modules/dashtrends/dashtrends.php
index c529b6058..9c512c3aa 100644
--- a/modules/dashtrends/dashtrends.php
+++ b/modules/dashtrends/dashtrends.php
@@ -79,6 +79,7 @@ class Dashtrends extends Module
return $this->display(__FILE__, 'dashboard_zone_two.tpl');
}
+ // get available data from database for each day within date range
protected function getData($date_from, $date_to, $id_hotel)
{
// We need the following figures to calculate our stats
@@ -113,6 +114,7 @@ class Dashtrends extends Module
return $tmp_data;
}
+ // interpolate data for missing days within date range
protected function refineData($date_from, $date_to, $gross_data)
{
$refined_data = array(
@@ -127,31 +129,30 @@ class Dashtrends extends Module
$from = strtotime($date_from.' 00:00:00');
$to = min(time(), strtotime($date_to.' 23:59:59'));
for ($date = $from; $date <= $to; $date = strtotime('+1 day', $date)) {
+ // initialize values for current date first
$refined_data['sales'][$date] = 0;
- if (isset($gross_data['total_paid_tax_excl'][$date])) {
- $refined_data['sales'][$date] += $gross_data['total_paid_tax_excl'][$date];
- }
+ $refined_data['orders'][$date] = 0;
+ $refined_data['average_cart_value'][$date] = 0;
+ $refined_data['visits'][$date] = 0;
+ $refined_data['conversion_rate'][$date] = 0;
+ $refined_data['net_profits'][$date] = 0;
+ // calculate actual values now for current date from available $gross_data to be used to display in line chart
+ $refined_data['sales'][$date] = isset($gross_data['total_paid_tax_excl'][$date]) ? $gross_data['total_paid_tax_excl'][$date] : 0;
$refined_data['orders'][$date] = isset($gross_data['orders'][$date]) ? $gross_data['orders'][$date] : 0;
$refined_data['average_cart_value'][$date] = $refined_data['orders'][$date] ? $refined_data['sales'][$date] / $refined_data['orders'][$date] : 0;
$refined_data['visits'][$date] = isset($gross_data['visits'][$date]) ? $gross_data['visits'][$date] : 0;
$refined_data['conversion_rate'][$date] = $refined_data['visits'][$date] ? $refined_data['orders'][$date] / $refined_data['visits'][$date] : 0;
- $refined_data['net_profits'][$date] = 0;
- if (isset($gross_data['total_paid_tax_excl'][$date])) {
- $refined_data['net_profits'][$date] += $gross_data['total_paid_tax_excl'][$date];
- }
- if (isset($gross_data['total_purchases'][$date])) {
- $refined_data['net_profits'][$date] -= $gross_data['total_purchases'][$date];
- }
- if (isset($gross_data['total_expenses'][$date])) {
- $refined_data['net_profits'][$date] -= $gross_data['total_expenses'][$date];
- }
+ $refined_data['net_profits'][$date] += (isset($gross_data['total_paid_tax_excl'][$date]) ? $gross_data['total_paid_tax_excl'][$date] : 0);
+ $refined_data['net_profits'][$date] -= (isset($gross_data['total_purchases'][$date]) ? $gross_data['total_purchases'][$date] : 0);
+ $refined_data['net_profits'][$date] -= (isset($gross_data['total_expenses'][$date]) ? $gross_data['total_expenses'][$date] : 0);
}
return $refined_data;
}
+ // calculate sum of individual values
protected function addupData($data)
{
$summing = array(
@@ -232,7 +233,7 @@ class Dashtrends extends Module
'orders_score' => Tools::displayNumber($this->dashboard_data_sum['orders'], $this->currency),
'cart_value_score' => $cart_value_score,
'visits_score' => Tools::displayNumber($this->dashboard_data_sum['visits'], $this->currency),
- 'conversion_rate_score' => round(100 * $this->dashboard_data_sum['conversion_rate'], 2).'%',
+ 'conversion_rate_score' => sprintf('%0.2f', 100 * $this->dashboard_data_sum['conversion_rate']).'%',
'net_profits_score' => $net_profit_score,
),
'data_trends' => $this->data_trends,
@@ -309,7 +310,7 @@ class Dashtrends extends Module
$charts = array(
'sales' => $this->l('Sales'),
- 'orders' => $this->l('Orders'),
+ 'orders' => $this->l('Bookings'),
'average_cart_value' => $this->l('Average Cart Value'),
'visits' => $this->l('Visits'),
'conversion_rate' => $this->l('Conversion Rate'),
@@ -317,7 +318,7 @@ class Dashtrends extends Module
);
$gfx_color = array('#72C3F0','#56CE56','#FF4036','#FF7F0E','#A569DF','#AF8A42');
- $gfx_color_border = array('#11f0fc','#118c11','#9e1010','#af5c13','#681daf','#845c0d');
+ $gfx_color_border = $gfx_color;
$gfx_color_compare = array('#1777B6','#19900d','#b9140c','#bf6307','#6B399C','#B3591F');
$i = 0;
diff --git a/modules/dashtrends/views/templates/hook/dashboard_zone_two.tpl b/modules/dashtrends/views/templates/hook/dashboard_zone_two.tpl
index aad61f1db..3eff771d5 100644
--- a/modules/dashtrends/views/templates/hook/dashboard_zone_two.tpl
+++ b/modules/dashtrends/views/templates/hook/dashboard_zone_two.tpl
@@ -64,7 +64,7 @@
-
{l s='Cart Value' mod='dashtrends'}
+
{l s='Average Cart Value' mod='dashtrends'}
@@ -77,14 +77,14 @@
+ data-toggle="tooltip" data-placement="top" data-original-title="{l s='Conversion Rate is the percentage of visits that resulted in a validated booking.' mod='dashtrends'}" data-placement="bottom" style="background-color: #A569DF;">
{l s='Conversion Rate' mod='dashtrends'}
{l s='Net Profit' mod='dashtrends'}
diff --git a/modules/hotelreservationsystem/classes/HotelBookingDetail.php b/modules/hotelreservationsystem/classes/HotelBookingDetail.php
index 0eb8610cd..f8da3c535 100644
--- a/modules/hotelreservationsystem/classes/HotelBookingDetail.php
+++ b/modules/hotelreservationsystem/classes/HotelBookingDetail.php
@@ -1124,10 +1124,10 @@ class HotelBookingDetail extends ObjectModel
*
* @return [boolean] [true if updated otherwise false]
*/
- public function updateOrderRefundStatus($id_order, $date_from = false, $date_to = false, $id_rooms = array())
+ public function updateOrderRefundStatus($id_order, $date_from = false, $date_to = false, $id_rooms = array(), $is_refunded = 1)
{
$table = 'htl_booking_detail';
- $data = array('is_refunded' => 1);
+ $data = array('is_refunded' => (int) $is_refunded);
if ($id_rooms) {
foreach ($id_rooms as $key_rm => $val_rm) {
$where = 'id_order='.(int)$id_order.' AND id_room = '.(int)$val_rm['id_room'].' AND `date_from`= \''.
diff --git a/modules/hotelreservationsystem/hotelreservationsystem.php b/modules/hotelreservationsystem/hotelreservationsystem.php
index 0d18ff40f..e686d2804 100644
--- a/modules/hotelreservationsystem/hotelreservationsystem.php
+++ b/modules/hotelreservationsystem/hotelreservationsystem.php
@@ -346,14 +346,40 @@ class hotelreservationsystem extends Module
}
}
- public function hookActionOrderStatusPostUpdate($params)
+ public function hookActionOrderStatusUpdate($params)
{
- $objHtlBkDtl = new HotelBookingDetail();
+ $objHotelBookingDetail = new HotelBookingDetail();
+ $statusesAvailable = $objHotelBookingDetail->getOrderStatusToFreeBookedRoom();
- // Make rooms available for booking if order status is cancelled, refunded or error
- if (in_array($params['newOrderStatus']->id, $objHtlBkDtl->getOrderStatusToFreeBookedRoom())) {
- if (!$objHtlBkDtl->updateOrderRefundStatus($params['id_order'])) {
- $this->context->controller->errors[] = $this->l('Error while making booked rooms available, attached with this order. Please try again !!');
+ if (in_array($params['newOrderStatus']->id, $statusesAvailable)) {
+ // make rooms available for booking if order status is changing to cancelled, refunded or error
+ if (!$objHotelBookingDetail->updateOrderRefundStatus(
+ $params['id_order'],
+ false,
+ false,
+ array(),
+ 1
+ )) {
+ $this->context->controller->errors[] = $this->l('Error while making rooms available attached with this order. Please try again.');
+ }
+ } else {
+ $objOrder = new Order($params['id_order']);
+ if (!Validate::isLoadedObject($objOrder)) {
+ return;
+ }
+
+ $objOrderStatusCurrent = $objOrder->getCurrentOrderState();
+ if (in_array($objOrderStatusCurrent->id, $statusesAvailable)) {
+ // make rooms unavailable for booking if previous order status was any of cancelled, refunded or error
+ if (!$objHotelBookingDetail->updateOrderRefundStatus(
+ $params['id_order'],
+ false,
+ false,
+ array(),
+ 0
+ )) {
+ $this->context->controller->errors[] = $this->l('Error while making rooms unavailable attached with this order. Please try again.');
+ }
}
}
}
@@ -514,7 +540,7 @@ class hotelreservationsystem extends Module
'actionObjectProfileAddAfter',
'actionObjectProfileDeleteBefore',
'actionObjectGroupDeleteBefore',
- 'actionOrderStatusPostUpdate'
+ 'actionOrderStatusUpdate',
)
);
}
diff --git a/modules/pagesnotfound/pagesnotfound.php b/modules/pagesnotfound/pagesnotfound.php
index 2c40e5be4..187e07198 100644
--- a/modules/pagesnotfound/pagesnotfound.php
+++ b/modules/pagesnotfound/pagesnotfound.php
@@ -164,7 +164,7 @@ class PagesNotFound extends Module
';
} else {
- $this->html .= '
'.$this->l('No "page not found" issue registered for now.').'
';
+ $this->html .= '
'.$this->l('No "Page not found" issue registered or database has been cleared for this time period.').'
';
}
if (count($pages)) {
diff --git a/modules/sekeywords/sekeywords.php b/modules/sekeywords/sekeywords.php
index 8843ff70f..8f57b1398 100644
--- a/modules/sekeywords/sekeywords.php
+++ b/modules/sekeywords/sekeywords.php
@@ -126,9 +126,9 @@ class SEKeywords extends ModuleGraph
'.$this->l('How does it work?').'
'
- .$this->l('When a visitor comes to your website, the web server notes the URL of the site he/she comes from. This module then parses the URL, and if it finds a reference to a known search engine, it finds the keywords in it.').' '.
- $this->l('This module can recognize all the search engines listed in QloApps\'s Stats/Search Engine page -- and you can add more!').' '.
- $this->l('IMPORTANT NOTE: in September 2013, Google chose to encrypt its searches queries using SSL. This means all the referer-based tools in the World (including this one) cannot identify Google keywords anymore.').'
+ .$this->l('When a visitor comes to your website, the web server notes the URL of the site he/she came from. This module then parses the URL, and if it finds a reference to a known search engine, it finds the keywords in it.').' '.
+ $this->l('This module can recognize all the search engines listed on Stats > Search Engines page -- and you can add more!').' '.
+ $this->l('IMPORTANT: In September 2013, Google chose to encrypt its searche queries using SSL. This means all HTTP referer-based tools in the world (including this one) cannot identify Google keywords anymore.').'
'.($total == 1 ? sprintf($this->l('%d keyword matches your query.'), $total) : sprintf($this->l('%d keywords match your query.'), $total)).'
'.$this->l('You must enable the "Save global page views" option from ').'Data mining for statistics'.$this->l(' module in order to display the most viewed hotels, or use the QloApps Google Analytics module.').'
'.$this->l('You must enable the "Save global page views" option from ').'Data mining for statistics'.$this->l(' module in order to display the most viewed room types, or use the QloApps Google Analytics module.').'
';
+ }
+ $html .= $this->engine($engine_params).'
- '.$this->l('CSV Export').'
+ '.$this->l('CSV Export').'
';
+
+ return $html;
}
public function getData()
@@ -161,24 +167,43 @@ class StatsBestProducts extends ModuleGrid
WHERE pa.id_object = p.id_product AND pa.id_page_type = '.(int)Page::getPageTypeByName('product').'
AND dr.time_start BETWEEN '.$date_between.'
AND dr.time_end BETWEEN '.$date_between.'
- ) AS totalPageViewed,
- (SELECT COUNT(hbd.`id_room`) FROM '._DB_PREFIX_.'htl_booking_detail hbd WHERE hbd.`id_product` = p.id_product) AS totalRoomsSold,
- ROUND(IFNULL(IFNULL((SELECT COUNT(hbd.`id_room`) FROM '._DB_PREFIX_.'htl_booking_detail hbd WHERE hbd.`id_product` = p.id_product), 0) / (1 + LEAST(TO_DAYS('.$array_date_between[1].'), TO_DAYS(NOW())) - GREATEST(TO_DAYS('.$array_date_between[0].'), TO_DAYS(product_shop.date_add))), 0), 2) as averageQuantitySold,
- product_shop.active
- FROM '._DB_PREFIX_.'product p
- '.Shop::addSqlAssociation('product', 'p').'
- LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (p.id_product = pl.id_product AND pl.id_lang = '.(int)$this->getLang().' '.Shop::addSqlRestrictionOnLang('pl').')
- LEFT JOIN '._DB_PREFIX_.'htl_room_type hrt ON hrt.id_product = p.id_product
- LEFT JOIN '._DB_PREFIX_.'htl_branch_info_lang hbil ON (hbil.id = hrt.id_hotel AND hbil.id_lang = '.(int)$this->getLang().')
- LEFT JOIN '._DB_PREFIX_.'order_detail od ON od.product_id = p.id_product
- LEFT JOIN '._DB_PREFIX_.'orders o ON od.id_order = o.id_order
- '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').'
- '.Product::sqlStock('p', 0).'
- WHERE o.valid = 1
- AND o.invoice_date BETWEEN '.$date_between.'
- GROUP BY od.product_id';
+ ) AS totalPageViewed,';
+ if (explode(' ',trim($array_date_between[0]))[0] == explode(' ',trim($array_date_between[1]))[0]) {
+ $this->query .=' (SELECT
+ SUM(IFNULL(DATEDIFF(
+ IF ('.$array_date_between[1].' > hbd.`date_to`, hbd.`date_to`, '.$array_date_between[1].'),
+ IF ('.$array_date_between[0].' < hbd.`date_from`, hbd.`date_from`, '.$array_date_between[0].')
+ ), 0))
+ FROM '._DB_PREFIX_.'htl_booking_detail hbd WHERE hbd.`id_product` = p.id_product AND hbd.date_from <= '.$array_date_between[0].'
+ AND hbd.date_to > '.$array_date_between[0].') AS totalRoomsSold,
+ ROUND(IFNULL(IFNULL((SELECT COUNT(hbd.`id_room`) FROM '._DB_PREFIX_.'htl_booking_detail hbd WHERE hbd.`id_product` = p.id_product AND hbd.date_from <= '.$array_date_between[0].
+ ' AND hbd.date_to > '.$array_date_between[0].'), 0) / (1 + LEAST(TO_DAYS('.$array_date_between[1].'), TO_DAYS(NOW())) - GREATEST(TO_DAYS('.$array_date_between[0].'), TO_DAYS(product_shop.date_add))), 0), 2) as averageQuantitySold,';
+ } else {
+ $this->query .= '(SELECT
+ SUM(IFNULL(DATEDIFF(
+ IF ('.$array_date_between[1].' > hbd.`date_to`, hbd.`date_to`, '.$array_date_between[1].'),
+ IF ('.$array_date_between[0].' < hbd.`date_from`, hbd.`date_from`, '.$array_date_between[0].')
+ ), 0))
+ FROM '._DB_PREFIX_.'htl_booking_detail hbd WHERE hbd.`id_product` = p.id_product AND hbd.date_from BETWEEN '.$date_between.'
+ AND hbd.date_to BETWEEN '.$date_between.') AS totalRoomsSold,
+ ROUND(IFNULL(IFNULL((SELECT COUNT(hbd.`id_room`) FROM '._DB_PREFIX_.'htl_booking_detail hbd WHERE hbd.`id_product` = p.id_product AND hbd.date_from BETWEEN '.$date_between.
+ ' AND hbd.date_to BETWEEN '.$date_between.'), 0) / (1 + LEAST(TO_DAYS('.$array_date_between[1].'), TO_DAYS(NOW())) - GREATEST(TO_DAYS('.$array_date_between[0].'), TO_DAYS(product_shop.date_add))), 0), 2) as averageQuantitySold,';
+ }
+ $this->query .= 'product_shop.active
+ FROM '._DB_PREFIX_.'product p
+ '.Shop::addSqlAssociation('product', 'p').'
+ LEFT JOIN '._DB_PREFIX_.'product_lang pl ON (p.id_product = pl.id_product AND pl.id_lang = '.(int)$this->getLang().' '.Shop::addSqlRestrictionOnLang('pl').')
+ LEFT JOIN '._DB_PREFIX_.'htl_room_type hrt ON hrt.id_product = p.id_product
+ LEFT JOIN '._DB_PREFIX_.'htl_branch_info_lang hbil ON (hbil.id = hrt.id_hotel AND hbil.id_lang = '.(int)$this->getLang().')
+ LEFT JOIN '._DB_PREFIX_.'order_detail od ON od.product_id = p.id_product
+ LEFT JOIN '._DB_PREFIX_.'orders o ON od.id_order = o.id_order
+ '.Shop::addSqlRestriction(Shop::SHARE_ORDER, 'o').'
+ '.Product::sqlStock('p', 0).'
+ WHERE o.valid = 1
+ GROUP BY od.product_id';
if (Validate::IsName($this->_sort)) {
+
$this->query .= ' ORDER BY `'.bqSQL($this->_sort).'`';
if (isset($this->_direction) && Validate::isSortDirection($this->_direction)) {
$this->query .= ' '.$this->_direction;
@@ -190,6 +215,8 @@ class StatsBestProducts extends ModuleGrid
}
$values = Db::getInstance(_PS_USE_SQL_SLAVE_)->executeS($this->query);
+ $this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT FOUND_ROWS()');
+
$dateFrom = date("Y-m-d", strtotime($this->_employee->stats_date_from));
$dateTo = date("Y-m-d", strtotime($this->_employee->stats_date_to));
@@ -212,6 +239,5 @@ class StatsBestProducts extends ModuleGrid
unset($value);
$this->_values = $values;
- $this->_totalCount = Db::getInstance(_PS_USE_SQL_SLAVE_)->getValue('SELECT FOUND_ROWS()');
}
}
diff --git a/modules/statsbestvouchers/statsbestvouchers.php b/modules/statsbestvouchers/statsbestvouchers.php
index c748d1287..891b3ecfb 100644
--- a/modules/statsbestvouchers/statsbestvouchers.php
+++ b/modules/statsbestvouchers/statsbestvouchers.php
@@ -58,19 +58,19 @@ class StatsBestVouchers extends ModuleGrid
'id' => 'code',
'header' => $this->l('Code'),
'dataIndex' => 'code',
- 'align' => 'left'
+ 'align' => 'center'
),
array(
'id' => 'name',
'header' => $this->l('Name'),
'dataIndex' => 'name',
- 'align' => 'left'
+ 'align' => 'center'
),
array(
'id' => 'ca',
'header' => $this->l('Sales'),
'dataIndex' => 'ca',
- 'align' => 'right'
+ 'align' => 'center'
),
array(
'id' => 'total',
@@ -112,7 +112,7 @@ class StatsBestVouchers extends ModuleGrid
'.$this->engine($engine_params).'
- '.$this->l('CSV Export').'
+ '.$this->l('CSV Export').'
';
return $this->html;
diff --git a/modules/statscatalog/statscatalog.php b/modules/statscatalog/statscatalog.php
index c683d4018..3c90654dc 100644
--- a/modules/statscatalog/statscatalog.php
+++ b/modules/statscatalog/statscatalog.php
@@ -192,13 +192,13 @@ class StatsCatalog extends Module
$average_viewed = $total ? ($total_page_viewed / $total) : 0;
$conversion = number_format((float)($total_page_viewed ? ($total_booked_rooms / $total_page_viewed) : 0), 2, '.', '');
if ($conversion_reverse = number_format((float)($total_booked_rooms ? ($total_page_viewed / $total_booked_rooms) : 0), 2, '.', '')) {
- $conversion .= sprintf($this->l('(1 purchase / %d visits)'), $conversion_reverse);
+ $conversion .= sprintf($this->l(' (1 purchase / %d visits)'), $conversion_reverse);
}
$total_nv = $total - $this->getTotalProductViewed();
$html = '
-
+
'.$this->displayName.'
@@ -221,17 +221,17 @@ class StatsCatalog extends Module
';
+ }
$this->html .= '
@@ -633,7 +665,8 @@ class StatsForecast extends Module
ORDER BY total DESC';
$ca['currencies'] = Db::getInstance()->executeS($sql);
- $sql = 'SELECT SUM(total_paid_tax_excl / o.conversion_rate) as total, COUNT(*) AS nb
+ $sql = 'SELECT SUM(total_paid_tax_excl / o.conversion_rate) as total,
+ SUM(total_paid_tax_incl / o.conversion_rate) as total_incl, COUNT(*) AS nb
FROM `'._DB_PREFIX_.'orders` o
WHERE o.valid = 1
AND o.`invoice_date` BETWEEN '.ModuleGraph::getDateBetween().'
diff --git a/modules/statslive/statslive.php b/modules/statslive/statslive.php
index 3fcdc5142..f4f4c54a2 100644
--- a/modules/statslive/statslive.php
+++ b/modules/statslive/statslive.php
@@ -144,10 +144,8 @@ class StatsLive extends Module
$("#calendar").remove();
';
if (!Configuration::get('PS_STATSDATA_CUSTOMER_PAGESVIEWS')) {
- $this->html .= '
-
'.
- $this->l('You must activate the "Save page views for each customer" option in the "Data mining for statistics" (StatsData) module in order to see the pages that your visitors are currently viewing.').'
-
'.$this->l('You must enable the "Save page views for each customer" option from ').'Data mining for statistics'.$this->l(' module in order to see the pages that your visitors are currently viewing.').'
';
}
$this->html .= '
'.$this->l('Current online customers').'
';
@@ -195,7 +193,7 @@ class StatsLive extends Module
- '.$this->l('In the tab, we break down the 10 most popular referral websites that bring customers to your online store.').'
+ '.$this->l('This page lists the 10 most popular referral websites that bring customers to your website.').'
'.$this->l('Guide').'
'.$this->l('What is a referral website?').'
- '.$this->l('The referrer is the URL of the previous webpage from which a link was followed by the visitor.').'
- '.$this->l('A referrer also enables you to know which keywords visitors use in search engines when browsing for your online store.').'
- '.$this->l('A referrer can be:').'
+ '.$this->l('A referer is the URL of the previous webpage from which a link was followed by a visitor.').'
+ '.$this->l('A referer also enables you to know which keywords visitors use in search engines when searching for your website.').'
+ '.$this->l('A referer can be:').'
'.$this->l('Someone who posts a link to your website.').'
@@ -112,7 +112,7 @@ class StatsOrigin extends ModuleGraph
'.$this->l('Language distribution allows you to analyze the browsing language used by your customers.').'
- '.$this->l('CSV Export').'
+ '.$this->l('CSV Export').'
diff --git a/modules/statsproduct/statsproduct.php b/modules/statsproduct/statsproduct.php
index 5814d7c41..4b5eb3e4e 100644
--- a/modules/statsproduct/statsproduct.php
+++ b/modules/statsproduct/statsproduct.php
@@ -46,7 +46,7 @@ class StatsProduct extends ModuleGraph
$this->need_instance = 0;
parent::__construct();
-
+ $this->query = array();
$this->displayName = $this->l('Room type details');
$this->description = $this->l('Adds detailed statistics for each room type to the Stats dashboard.');
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.7.0.99');
@@ -180,7 +180,7 @@ class StatsProduct extends ModuleGraph
'.$this->l('Number of purchases compared to number of views').'
'.$this->l('After choosing a hotel and selecting a room type, informational graphs will appear.').'
-
'.$this->l('If you notice that a room type is often booked but viewed infrequently, you should display it more prominently in your Front Office.').'
+
'.$this->l('If you notice that a room type is often booked but viewed infrequently, you should display it more prominently at front office.').'
'.$this->l('On the other hand, if a room type has many views but is not often booked, we advise you to check or modify this room type\'s information, description and photography again, see if you can find something better.').'
@@ -216,13 +216,13 @@ class StatsProduct extends ModuleGraph
- '.$this->l('Number of visitors who stopped at the registering step:').' '.(int)$total_blocked.($total_registrations ? ' ('.number_format(100 * $total_blocked / ($total_registrations + $total_blocked), 2).'%)' : '').'
+ '.$this->l('Number of visitors who stopped at registration step:').' '.(int)$total_blocked.($total_registrations ? ' ('.number_format(100 * $total_blocked / ($total_registrations + $total_blocked), 2).'%)' : '').'
'.$this->l('Number of visitors who placed an order directly after registration:').' '.(int)$total_buyers.($total_registrations ? ' ('.number_format(100 * $total_buyers / ($total_registrations), 2).'%)' : '').'
@@ -141,7 +141,7 @@ class StatsRegistrations extends ModuleGraph
'.$this->l('Here is a summary of what may affect the creation of customer accounts:').'
'.$this->l('An advertising campaign can attract an increased number of visitors to your website. This will likely be followed by an increase in customer accounts and profit margins, which will depend on customer "quality." Well-targeted advertising is typically more effective than large-scale advertising... and it\'s cheaper too!').'
-
'.$this->l('Specials, sales, promotions and/or contests typically demand a customers\' attentions. Offering such things will not only keep your business lively, it will also increase traffic, build customer loyalty and genuinely change your current e-commerce philosophy.').'
+
'.$this->l('Specials, sales, promotions and/or contests typically demand a customers\' attentions. Offering such things will not only keep your business lively, it will also increase traffic, build customer loyalty and genuinely change your current business philosophy.').'
'.$this->l('Design and user-friendliness are more important than ever in the world of online sales. An ill-chosen or hard-to-follow graphical theme can keep customers at bay. This means that you should aspire to find the right balance between beauty and functionality for your website.').'
@@ -153,7 +153,7 @@ class StatsRegistrations extends ModuleGraph
@@ -170,7 +170,7 @@ class StatsRegistrations extends ModuleGraph
WHERE 1
'.Shop::addSqlRestriction(Shop::SHARE_CUSTOMER).'
AND `date_add` BETWEEN';
- $this->_titles['main'] = $this->l('Number of customer accounts created');
+ $this->_titles['main'] = $this->l('Number of customer registrations');
$this->setDateGraph($layers, true);
}
diff --git a/modules/statssales/statssales.php b/modules/statssales/statssales.php
index f70f0c38c..5357537fb 100644
--- a/modules/statssales/statssales.php
+++ b/modules/statssales/statssales.php
@@ -87,8 +87,8 @@ class StatsSales extends ModuleGraph
'.$this->l('About order statuses').'
- '.$this->l('In your Back Office, you can modify the following order statuses: Awaiting Check Payment, Payment Accepted, Preparation in Progress, Canceled, Refund, Payment Error, Out of Stock, and Awaiting Bank Wire Payment.').'
- '.$this->l('These order statuses cannot be removed from the Back Office; however you have the option to add more.').'
+ '.$this->l('In your back office, you can modify the following order statuses: Awaiting check payment, Payment accepted, Processing in progress, Canceled, Refunded, Payment error and Awaiting bank wire payment.').'
+ '.$this->l('These order statuses cannot be removed from the back office; however you have the option to add more.').'
'.$this->l('Cannot find any keywords that have been searched for more than once.').'
';
diff --git a/modules/statsvisits/statsvisits.php b/modules/statsvisits/statsvisits.php
index ef9a13c59..3442ac1f9 100644
--- a/modules/statsvisits/statsvisits.php
+++ b/modules/statsvisits/statsvisits.php
@@ -31,7 +31,7 @@ if (!defined('_PS_VERSION_')) {
class StatsVisits extends ModuleGraph
{
private $html = '';
- private $query = '';
+ private $query = array();
public function __construct()
{
@@ -43,7 +43,7 @@ class StatsVisits extends ModuleGraph
parent::__construct();
- $this->displayName = $this->l('Visits and Visitors');
+ $this->displayName = $this->l('Visits and visitors');
$this->description = $this->l('Adds statistics about your visits and visitors to the Stats dashboard.');
$this->ps_versions_compliancy = array('min' => '1.6', 'max' => '1.7.0.99');
}
@@ -102,7 +102,7 @@ class StatsVisits extends ModuleGraph
'.$this->l('If this is the case, congratulations, your website is well planned and pleasing. Glad to see that you\'ve been paying attention.').'
-
'.$this->l('Otherwise, the conclusion is not so simple. The problem can be aesthetic or ergonomic. It is also possible that many visitors have mistakenly visited your URL without possessing a particular interest in your website. This strange and ever-confusing phenomenon is most likely cause by search engines. If this is the case, you should consider revising your SEO structure.').'
+
'.$this->l('Otherwise, the conclusion is not so simple. The problem can be aesthetic or ergonomic. It is also possible that many visitors have mistakenly visited your URL without possessing a particular interest in your website. This strange and ever-confusing phenomenon is most likely caused by search engines. If this is the case, you should consider revising your SEO structure.').'
'.$this->l('This information is mostly qualitative. It is up to you to determine the interest of a disjointed visit.').'
@@ -110,7 +110,7 @@ class StatsVisits extends ModuleGraph
'.$this->l('A visit corresponds to an internet user coming to your website, 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 website multiple times.').'
+ '.$this->l('A visitor is an unknown person who has not registered or logged into your website. A visitor can also be considered a person who has visited your website multiple times.').'