// update stats tab
This commit is contained in:
@@ -155,7 +155,23 @@ class StatsProduct extends ModuleGraph
|
||||
if (!Tools::getValue('exportType'))
|
||||
$this->csvExport(array('layers' => 2, 'type' => 'line', 'option' => '42'));
|
||||
|
||||
$this->html = '<div class="blocStats"><h2 class="icon-'.$this->name.'"><span></span>'.$this->displayName.'</h2>';
|
||||
$this->html = '
|
||||
<div class="panel-heading">
|
||||
'.$this->displayName.'
|
||||
</div>
|
||||
<h4>'.$this->l('Guide').'</h4>
|
||||
<div class="alert alert-warning">
|
||||
<h4>'.$this->l('Number of purchases compared to number of views.').'</h4>
|
||||
<p>
|
||||
'.$this->l('After choosing a category and selecting a product, informational graphs will appear.').'
|
||||
<ul>
|
||||
<li class="bullet">'.$this->l('If you notice that a product is often purchased but viewed infrequently, you should display it more prominently in your Front Office. ').'</li>
|
||||
<li class="bullet">'.$this->l('On the other hand, if a product has many viewings but is not often purchased,
|
||||
we advise you to check or modify this product\'s information, description and photography again.').'
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>';
|
||||
if ($id_product = (int)Tools::getValue('id_product'))
|
||||
{
|
||||
if (Tools::getValue('export'))
|
||||
@@ -167,71 +183,107 @@ class StatsProduct extends ModuleGraph
|
||||
$totalBought = $this->getTotalBought($product->id);
|
||||
$totalSales = $this->getTotalSales($product->id);
|
||||
$totalViewed = $this->getTotalViewed($product->id);
|
||||
$this->html .= '<h3>'.$product->name.' - '.$this->l('Details').'</h3>
|
||||
<p>'.$this->l('Total bought:').' '.$totalBought.'</p>
|
||||
<p>'.$this->l('Sales ( Figure does not include tax):').' '.Tools::displayprice($totalSales, $currency).'</p>
|
||||
<p>'.$this->l('Total viewed:').' '.$totalViewed.'</p>
|
||||
<p>'.$this->l('Conversion rate:').' '.number_format($totalViewed ? $totalBought / $totalViewed : 0, 2).'</p>
|
||||
<center>'.$this->engine(array('layers' => 2, 'type' => 'line', 'option' => '1-'.$id_product)).'</center>
|
||||
<br />
|
||||
<p><a class="button export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1&exportType=1"><span>'.$this->l('CSV Export').'</span></a></p>';
|
||||
$this->html .= '<h4>'.$product->name.' - '.$this->l('Details').'</h4>
|
||||
<div class="row">
|
||||
<div class="col-lg-12">
|
||||
<div class="col-lg-8">
|
||||
'.$this->engine(array('layers' => 2, 'type' => 'line', 'option' => '1-'.$id_product)).'
|
||||
</div>
|
||||
<div class="col-lg-4">
|
||||
<ul class="list-unstyled">
|
||||
<li>'.$this->l('Total bought:').' '.$totalBought.'</li>
|
||||
<li>'.$this->l('Sales ( Figure does not include tax):').' '.Tools::displayprice($totalSales, $currency).'</li>
|
||||
<li>'.$this->l('Total viewed:').' '.$totalViewed.'</li>
|
||||
<li>'.$this->l('Conversion rate:').' '.number_format($totalViewed ? $totalBought / $totalViewed : 0, 2).'</li>
|
||||
</ul>
|
||||
<a class="btn btn-default export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1&exportType=1">
|
||||
<i class="icon-cloud-upload"></i> '.$this->l('CSV Export').'
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
if ($hasAttribute = $product->hasAttributes() && $totalBought)
|
||||
$this->html .= '<h3 class="space">'.$this->l('Attribute sales distribution').'</h3><center>'.$this->engine(array('type' => 'pie', 'option' => '3-'.$id_product)).'</center><br />
|
||||
<p><a href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1&exportType=2"><img src="../img/admin/asterisk.gif" />'.$this->l('CSV Export').'</a></p><br />';
|
||||
<a href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1&exportType=2"><img src="../img/admin/asterisk.gif" />'.$this->l('CSV Export').'</a>';
|
||||
if ($totalBought)
|
||||
{
|
||||
$sales = $this->getSales($id_product, $this->context->language->id);
|
||||
$this->html .= '
|
||||
<h3>'.$this->l('Sales').'</h3>
|
||||
<h4>'.$this->l('Sales').'</h4>
|
||||
<div style="overflow-y: scroll; height: '.min(400, (count($sales) + 1) * 32).'px;">
|
||||
<table class="table" border="0" cellspacing="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>'.$this->l('Date').'</th>
|
||||
<th>'.$this->l('Order').'</th>
|
||||
<th>'.$this->l('Customer').'</th>
|
||||
'.($hasAttribute ? '<th>'.$this->l('Attribute').'</th>' : '').'
|
||||
<th>'.$this->l('Quantity').'</th>
|
||||
<th>'.$this->l('Price').'</th>
|
||||
</tr>
|
||||
</thead><tbody>';
|
||||
$tokenOrder = Tools::getAdminToken('AdminOrders'.(int)Tab::getIdFromClassName('AdminOrders').(int)$this->context->employee->id);
|
||||
$tokenCustomer = Tools::getAdminToken('AdminCustomers'.(int)Tab::getIdFromClassName('AdminCustomers').(int)$this->context->employee->id);
|
||||
foreach ($sales as $sale)
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<span class="title_box active">'.$this->l('Date').'</span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="title_box active">'.$this->l('Order').'</span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="title_box active">'.$this->l('Customer').'</span>
|
||||
</th>
|
||||
'.($hasAttribute ? '<th><span class="title_box active">'.$this->l('Attribute').'</span></th>' : '').'
|
||||
<th>
|
||||
<span class="title_box active">'.$this->l('Quantity').'</span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="title_box active">'.$this->l('Price').'</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
$tokenOrder = Tools::getAdminToken('AdminOrders'.(int)Tab::getIdFromClassName('AdminOrders').(int)$this->context->employee->id);
|
||||
$tokenCustomer = Tools::getAdminToken('AdminCustomers'.(int)Tab::getIdFromClassName('AdminCustomers').(int)$this->context->employee->id);
|
||||
foreach ($sales as $sale)
|
||||
$this->html .= '
|
||||
<tr>
|
||||
<td>'.Tools::displayDate($sale['date_add'],null , false).'</td>
|
||||
<td align="center"><a href="?tab=AdminOrders&id_order='.$sale['id_order'].'&vieworder&token='.$tokenOrder.'">'.(int)($sale['id_order']).'</a></td>
|
||||
<td align="center"><a href="?tab=AdminCustomers&id_customer='.$sale['id_customer'].'&viewcustomer&token='.$tokenCustomer.'">'.(int)($sale['id_customer']).'</a></td>
|
||||
'.($hasAttribute ? '<td>'.$sale['product_name'].'</td>' : '').'
|
||||
<td>'.(int)$sale['product_quantity'].'</td>
|
||||
<td>'.Tools::displayprice($sale['total'], $currency).'</td>
|
||||
</tr>';
|
||||
$this->html .= '
|
||||
<tr>
|
||||
<td>'.Tools::displayDate($sale['date_add'],null , false).'</td>
|
||||
<td align="center"><a href="?tab=AdminOrders&id_order='.$sale['id_order'].'&vieworder&token='.$tokenOrder.'">'.(int)($sale['id_order']).'</a></td>
|
||||
<td align="center"><a href="?tab=AdminCustomers&id_customer='.$sale['id_customer'].'&viewcustomer&token='.$tokenCustomer.'">'.(int)($sale['id_customer']).'</a></td>
|
||||
'.($hasAttribute ? '<td>'.$sale['product_name'].'</td>' : '').'
|
||||
<td>'.(int)$sale['product_quantity'].'</td>
|
||||
<td>'.Tools::displayprice($sale['total'], $currency).'</td>
|
||||
</tr>';
|
||||
$this->html .= '</tbody></table></div>';
|
||||
</tbody>
|
||||
</table>
|
||||
</div>';
|
||||
|
||||
$crossSelling = $this->getCrossSales($id_product, $this->context->language->id);
|
||||
if (count($crossSelling))
|
||||
{
|
||||
$this->html .= '<br class="clear" />
|
||||
<h3>'.$this->l('Cross selling').'</h3>
|
||||
$this->html .= '
|
||||
<h4>'.$this->l('Cross selling').'</h4>
|
||||
<div style="overflow-y: scroll; height: 200px;">
|
||||
<table class="table" border="0" cellspacing="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>'.$this->l('Product name').'</th>
|
||||
<th>'.$this->l('Quantity sold').'</th>
|
||||
<th>'.$this->l('Average price').'</th>
|
||||
</tr>
|
||||
</thead><tbody>';
|
||||
$tokenProducts = Tools::getAdminToken('AdminProducts'.(int)Tab::getIdFromClassName('AdminProducts').(int)$this->context->employee->id);
|
||||
foreach ($crossSelling as $selling)
|
||||
<h4>'.$this->l('Cross selling').'</h4>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<span class="title_box active">'.$this->l('Product name').'</span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="title_box active">'.$this->l('Quantity sold').'</span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="title_box active">'.$this->l('Average price').'</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
$tokenProducts = Tools::getAdminToken('AdminProducts'.(int)Tab::getIdFromClassName('AdminProducts').(int)$this->context->employee->id);
|
||||
foreach ($crossSelling as $selling)
|
||||
$this->html .= '
|
||||
<tr>
|
||||
<td ><a href="?tab=AdminProducts&id_product='.(int)$selling['id_product'].'&addproduct&token='.$tokenProducts.'">'.$selling['pname'].'</a></td>
|
||||
<td align="center">'.(int)$selling['pqty'].'</td>
|
||||
<td align="right">'.Tools::displayprice($selling['pprice'], $currency).'</td>
|
||||
</tr>';
|
||||
$this->html .= '
|
||||
<tr>
|
||||
<td ><a href="?tab=AdminProducts&id_product='.(int)$selling['id_product'].'&addproduct&token='.$tokenProducts.'">'.$selling['pname'].'</a></td>
|
||||
<td align="center">'.(int)$selling['pqty'].'</td>
|
||||
<td align="right">'.Tools::displayprice($selling['pprice'], $currency).'</td>
|
||||
</tr>';
|
||||
$this->html .= '</tbody></table></div>';
|
||||
</tbody>
|
||||
</table>
|
||||
</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -239,29 +291,39 @@ class StatsProduct extends ModuleGraph
|
||||
{
|
||||
$categories = Category::getCategories((int)$this->context->language->id, true, false);
|
||||
$this->html .= '
|
||||
<div class="margin-form">
|
||||
<form action="" method="post" id="categoriesForm">
|
||||
<label class="t">'.$this->l('Choose a category').'</label>
|
||||
<select name="id_category" onchange="$(\'#categoriesForm\').submit();">
|
||||
<option value="0">'.$this->l('All').'</option>';
|
||||
foreach ($categories as $category)
|
||||
$this->html .= '<option value="'.$category['id_category'].'"'.($id_category == $category['id_category'] ? ' selected="selected"' : '').'>'.$category['name'].'</option>';
|
||||
$this->html .= '
|
||||
</select>
|
||||
</form>
|
||||
</div>
|
||||
<p>'.$this->l('Click on a product to access its statistics!').'</p>
|
||||
|
||||
<h2>'.$this->l('Products available').'</h2>
|
||||
<div>
|
||||
<form action="" method="post" id="categoriesForm" class="form-horizontal">
|
||||
<div class="row row-margin-form">
|
||||
<label class="control-label col-lg-3" for="id_category">
|
||||
<span title="" data-toggle="tooltip" class="label-tooltip" data-original-title="'.$this->l('Click on a product to access its statistics!').'">
|
||||
'.$this->l('Choose a category').'
|
||||
</span>
|
||||
</label>
|
||||
<div class="col-lg-3">
|
||||
<select name="id_category" onchange="$(\'#categoriesForm\').submit();">
|
||||
<option value="0">'.$this->l('All').'</option>';
|
||||
foreach ($categories as $category)
|
||||
$this->html .= '<option value="'.$category['id_category'].'"'.($id_category == $category['id_category'] ? ' selected="selected"' : '').'>'.$category['name'].'</option>';
|
||||
$this->html .= '
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<h4>'.$this->l('Products available').'</h4>
|
||||
<table class="table" border="0" cellspacing="0" cellspacing="0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>'.$this->l('Ref.').'</th>
|
||||
<th>'.$this->l('Name').'</th>
|
||||
<th>'.$this->l('Available quantity for sale').'</th>
|
||||
</tr>
|
||||
</thead><tbody>';
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<span class="title_box active">'.$this->l('Ref.').'</span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="title_box active">'.$this->l('Name').'</span>
|
||||
</th>
|
||||
<th>
|
||||
<span class="title_box active">'.$this->l('Available quantity for sale').'</span>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
|
||||
foreach ($this->getProducts($this->context->language->id) as $product)
|
||||
$this->html .= '
|
||||
@@ -273,23 +335,13 @@ class StatsProduct extends ModuleGraph
|
||||
<td>'.$product['quantity'].'</td>
|
||||
</tr>';
|
||||
|
||||
$this->html .= '</tbody></table><br /></div><br />
|
||||
<a class="button export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1"><span>'.$this->l('CSV Export').'</span></a><br />';
|
||||
$this->html .= '
|
||||
</tbody>
|
||||
</table>
|
||||
<a class="btn btn-default export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1">
|
||||
<i class="icon-cloud-upload"></i> '.$this->l('CSV Export').'
|
||||
</a>';
|
||||
}
|
||||
|
||||
$this->html .= '</div><br />
|
||||
<div class="blocStats"><h2 class="icon-guide"><span></span>'.$this->l('Guide').'</h2>
|
||||
<h2>'.$this->l('Number of purchases compared to number of views.').'</h2>
|
||||
<p>
|
||||
'.$this->l('After choosing a category and selecting a product, informational graphs will appear.').'
|
||||
<ul>
|
||||
<li class="bullet">'.$this->l('If you notice that a product is often purchased but viewed infrequently, you should display it more prominently in your Front Office. ').'</li>
|
||||
<li class="bullet">'.$this->l('On the other hand, if a product has many viewings but is not often purchased,
|
||||
we advise you to check or modify this product\'s information, description and photography again.').'
|
||||
</li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>';
|
||||
return $this->html;
|
||||
}
|
||||
|
||||
|
||||
@@ -108,50 +108,46 @@ class StatsRegistrations extends ModuleGraph
|
||||
if (Tools::getValue('export'))
|
||||
$this->csvExport(array('layers' => 0, 'type' => 'line'));
|
||||
$this->_html = '
|
||||
<div class="blocStats">
|
||||
<div class="panel-heading">
|
||||
'.$this->l('Guide').'
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<h4>'.$this->l('Number of customer accounts created').'</h4>
|
||||
<p>'.$this->l('The total number of accounts created is not in itself important information. However, it is beneficial to analyze the number created over time. This will indicate whether or not things are on the right track. You feel me?').'</p>
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
'.$this->l('How to act on the registrations\' evolution?').'
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
'.$this->l('If you let your shop run without changing anything, the number of customer registrations should stay stable or slightly decline.').'
|
||||
'.$this->l('A significant increase or decrease in customer registration shows that there has probably been a change to your shop.With that in mind, we suggest that you identify the cause, correct the issue and get back in the business of making money!').'<br />
|
||||
'.$this->l('Here is a summary of what may affect the creation of customer accounts:').'
|
||||
<ul>
|
||||
<li>'.$this->l('An advertising campaign can attract an increased number of visitors to your online store. 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!').'</li>
|
||||
<li>'.$this->l('Specials, sales, promotions and/or contests typically demand a shoppers\' attentions. Offering such things will not only keep your business lively, it will also increase traffic, build customer loyalty and genuine change your current e-commerce philosophy.').'</li>
|
||||
<li>'.$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 shoppers at bay. This means that you should aspire to find the right balance between beauty and functionality for your online store.').'</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
'.$this->displayName.'
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<ul>
|
||||
<li>
|
||||
'.$this->l('Number of visitors who stopped at the registering step:').' <span class="totalStats">'.(int)($totalBlocked).($totalRegistrations ? ' ('.number_format(100*$totalBlocked/($totalRegistrations+$totalBlocked), 2).'%)' : '').'</span><li/>
|
||||
'.$this->l('Number of visitors who placed an order directly after registration:').' <span class="totalStats">'.(int)($totalBuyers).($totalRegistrations ? ' ('.number_format(100*$totalBuyers/($totalRegistrations), 2).'%)' : '').'</span>
|
||||
<li>'.$this->l('Total customer accounts:').' <span class="totalStats">'.$totalRegistrations.'</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="row row-margin-bottom">
|
||||
<div class="col-lg-12">
|
||||
<div class="col-lg-6">
|
||||
'.$this->engine(array('type' => 'line')).'
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<a class="btn btn-default export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1">
|
||||
<i class="icon-cloud-upload"></i>'.$this->l('CSV Export').'
|
||||
</a>
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
'.$this->displayName.'
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<ul>
|
||||
<li>
|
||||
'.$this->l('Number of visitors who stopped at the registering step:').' <span class="totalStats">'.(int)($totalBlocked).($totalRegistrations ? ' ('.number_format(100*$totalBlocked/($totalRegistrations+$totalBlocked), 2).'%)' : '').'</span><li/>
|
||||
'.$this->l('Number of visitors who placed an order directly after registration:').' <span class="totalStats">'.(int)($totalBuyers).($totalRegistrations ? ' ('.number_format(100*$totalBuyers/($totalRegistrations), 2).'%)' : '').'</span>
|
||||
<li>'.$this->l('Total customer accounts:').' <span class="totalStats">'.$totalRegistrations.'</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
<h4>'.$this->l('Guide').'</h4>
|
||||
<div class="alert alert-warning">
|
||||
<h4>'.$this->l('Number of customer accounts created').'</h4>
|
||||
<p>'.$this->l('The total number of accounts created is not in itself important information. However, it is beneficial to analyze the number created over time. This will indicate whether or not things are on the right track. You feel me?').'</p>
|
||||
</div>
|
||||
<h4>'.$this->l('How to act on the registrations\' evolution?').'</h4>
|
||||
<div class="alert alert-warning">
|
||||
'.$this->l('If you let your shop run without changing anything, the number of customer registrations should stay stable or slightly decline.').'
|
||||
'.$this->l('A significant increase or decrease in customer registration shows that there has probably been a change to your shop.With that in mind, we suggest that you identify the cause, correct the issue and get back in the business of making money!').'<br />
|
||||
'.$this->l('Here is a summary of what may affect the creation of customer accounts:').'
|
||||
<ul>
|
||||
<li>'.$this->l('An advertising campaign can attract an increased number of visitors to your online store. 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!').'</li>
|
||||
<li>'.$this->l('Specials, sales, promotions and/or contests typically demand a shoppers\' attentions. Offering such things will not only keep your business lively, it will also increase traffic, build customer loyalty and genuine change your current e-commerce philosophy.').'</li>
|
||||
<li>'.$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 shoppers at bay. This means that you should aspire to find the right balance between beauty and functionality for your online store.').'</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="row row-margin-bottom">
|
||||
<div class="col-lg-12">
|
||||
<div class="col-lg-8">
|
||||
'.$this->engine(array('type' => 'line')).'
|
||||
</div>
|
||||
</div>';
|
||||
<div class="col-lg-4">
|
||||
<a class="btn btn-default export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1">
|
||||
<i class="icon-cloud-upload"></i>'.$this->l('CSV Export').'
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
return $this->_html;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,20 +66,17 @@ class StatsSales extends ModuleGraph
|
||||
$this->csvExport(array('type' => 'pie', 'option' => '3-'.(int)Tools::getValue('id_country')));
|
||||
|
||||
$this->_html = '
|
||||
<div class="blocStats">
|
||||
<div class="panel-heading">
|
||||
'.$this->l('Guide').'
|
||||
'.$this->displayName.'
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<h4>'.$this->l('Guide').'</h4>
|
||||
<div class="alert alert-warning">
|
||||
<h4>'.$this->l('Various order statuses').'</h4>
|
||||
<p>
|
||||
'.$this->l('In your Back Office, you can modify the following order statuses: Awaiting Check Payment, Payment Accepted, Preparation in Progress, Shipping, Delivered, Cancelled, Refund, Payment Error, Out of Stock, and Awaiting Bank Wire Payment.').'<br />
|
||||
'.$this->l('These order statuses cannot be removed from the Back Office, however you have the option to add more.').'
|
||||
</p>
|
||||
</div>
|
||||
<div class="panel-heading">
|
||||
'.$this->displayName.'
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<p>'.$this->l('The following graphs represent the evolution of your e-store\'s orders and sales turnover for a selected period. This tool is one that you should use often as it allows you to quickly monitor your store\'s viability. This feature also allows you to monitor multiple time periods, and only valid orders are graphically represented.').'</p>
|
||||
</div>
|
||||
@@ -99,36 +96,34 @@ class StatsSales extends ModuleGraph
|
||||
</form>
|
||||
<div class="row row-margin-bottom">
|
||||
<div class="col-lg-12">
|
||||
<div class="col-lg-6">
|
||||
<div class="col-lg-8">
|
||||
'.$this->engine(array('type' => 'line', 'option' => '1-'.(int)Tools::getValue('id_country'), 'layers' => 2)).'
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="col-lg-4">
|
||||
<ul class="list-unstyled">
|
||||
<li>'.$this->l('Orders placed:').' <span class="totalStats">'.(int)($totals['orderCount']).'</span></li>
|
||||
<li>'.$this->l('Products bought:').' <span class="totalStats">'.(int)($totals['products']).'</span></li>
|
||||
<li>
|
||||
<a class="btn btn-default export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1">
|
||||
<i class="icon-cloud-upload"></i> '.$this->l('CSV Export').'
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr/>
|
||||
<a class="btn btn-default export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1">
|
||||
<i class="icon-cloud-upload"></i> '.$this->l('CSV Export').'
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row row-margin-bottom">
|
||||
<div class="col-lg-12">
|
||||
<div class="col-lg-6">
|
||||
<div>'.$this->engine(array('type' => 'line', 'option' => '2-'.(int)Tools::getValue('id_country'))).'</div>
|
||||
<div class="col-lg-8">
|
||||
'.$this->engine(array('type' => 'line', 'option' => '2-'.(int)Tools::getValue('id_country'))).'
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="col-lg-4">
|
||||
<ul class="list-unstyled">
|
||||
<li>'.$this->l('Sales').' '.Tools::displayPrice($totals['orderSum'], $currency).'</li>
|
||||
<li>
|
||||
<a class="btn btn-default export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=2">
|
||||
<i class="icon-cloud-upload"></i> '.$this->l('CSV Export').'
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
<hr/>
|
||||
<a class="btn btn-default export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=2">
|
||||
<i class="icon-cloud-upload"></i> '.$this->l('CSV Export').'
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -137,17 +132,16 @@ class StatsSales extends ModuleGraph
|
||||
</div>
|
||||
<div class="row row-margin-bottom">
|
||||
<div class="col-lg-12">
|
||||
<div class="col-lg-6">
|
||||
<div class="col-lg-8">
|
||||
'.($totals['orderCount'] ? $this->engine(array('type' => 'pie', 'option' => '3-'.(int)Tools::getValue('id_country'))) : $this->l('No orders for this period.')).'</center>
|
||||
</div>
|
||||
<div class="col-lg-6">
|
||||
<div class="col-lg-4">
|
||||
<a class="btn btn-default export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=3">
|
||||
<i class="icon-cloud-upload"></i> '.$this->l('CSV Export').'
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div >';
|
||||
</div>';
|
||||
return $this->_html;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user