Merge branch 'bootstrap' of https://github.com/PrestaShop/PrestaShop into bootstrap

This commit is contained in:
Jerome Nadaud
2013-09-16 16:12:37 +02:00
2 changed files with 115 additions and 47 deletions
@@ -108,21 +108,18 @@ class StatsRegistrations extends ModuleGraph
if (Tools::getValue('export'))
$this->csvExport(array('layers' => 0, 'type' => 'line'));
$this->_html = '
<div class="blocStats"><h2 class="icon-'.$this->name.'"><span></span>'.$this->displayName.'</h2>
<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>'.$this->engine(array('type' => 'line')).'</div>
<p><a class="button export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1"><span>'.$this->l('CSV Export').'</span></a></p>
</div><br />
<div class="blocStats"><h2 class="icon-guide"><span></span>'.$this->l('Guide').'</legend>
<h2>'.$this->l('Number of customer accounts created').'</h2>
<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>
<br /><h3>'.$this->l('How to act on the registrations\' evolution?').'</h3>
<p>
<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:').'
@@ -131,8 +128,30 @@ class StatsRegistrations extends ModuleGraph
<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>
</p><br />
</div>';
</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>
</div>';
return $this->_html;
}
+79 -30
View File
@@ -66,38 +66,87 @@ class StatsSales extends ModuleGraph
$this->csvExport(array('type' => 'pie', 'option' => '3-'.(int)Tools::getValue('id_country')));
$this->_html = '
<div class="blocStats"><h2 class="icon-'.$this->name.'"><span></span>'.$this->displayName.'</h2>
<form action="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'" method="post" style="float: right; margin-left: 10px;">
<select name="id_country">
<option value="0"'.((!Tools::getValue('id_order_state')) ? ' selected="selected"' : '').'>'.$this->l('All').'</option>';
foreach (Country::getCountries($this->context->language->id) AS $country)
$this->_html .= '<option value="'.$country['id_country'].'"'.(($country['id_country'] == Tools::getValue('id_country')) ? ' selected="selected"' : '').'>'.$country['name'].'</option>';
$this->_html .= '</select>
<input type="submit" name="submitCountry" value="'.$this->l('Filter').'" class="button" />
<div class="blocStats">
<div class="panel-heading">
'.$this->l('Guide').'
</div>
<div class="alert alert-info">
<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>
<form action="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'" method="post" class="form-horizontal alert">
<div class="row">
<div class="col-lg-4 col-lg-offset-7">
<select name="id_country">
<option value="0"'.((!Tools::getValue('id_order_state')) ? ' selected="selected"' : '').'>'.$this->l('All').'</option>';
foreach (Country::getCountries($this->context->language->id) AS $country)
$this->_html .= '<option value="'.$country['id_country'].'"'.(($country['id_country'] == Tools::getValue('id_country')) ? ' selected="selected"' : '').'>'.$country['name'].'</option>';
$this->_html .= '</select>
</div>
<div class="col-lg-1">
<input type="submit" name="submitCountry" value="'.$this->l('Filter').'" class="btn btn-default pull-right" />
</div>
</div>
</form>
<p><img src="../img/admin/down.gif" />
'.$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>
<p>'.$this->l('Orders placed:').' <span class="totalStats">'.(int)($totals['orderCount']).'</span></p>
<p>'.$this->l('Products bought:').' <span class="totalStats">'.(int)($totals['products']).'</span></p>
<div>'.$this->engine(array('type' => 'line', 'option' => '1-'.(int)Tools::getValue('id_country'), 'layers' => 2)).'</div>
<p><a class="button export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1"><span>'.$this->l('CSV Export').'</span></a></p>
<h4>'.$this->l('Sales:').' '.Tools::displayPrice($totals['orderSum'], $currency).'</h4>
<div>'.$this->engine(array('type' => 'line', 'option' => '2-'.(int)Tools::getValue('id_country'))).'</div>
<p><a class="button export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=2"><span>'.$this->l('CSV Export').'</span></a></p>
<p class="space"><img src="../img/admin/down.gif" />
<div class="row row-margin-bottom">
<div class="col-lg-12">
<div class="col-lg-6">
'.$this->engine(array('type' => 'line', 'option' => '1-'.(int)Tools::getValue('id_country'), 'layers' => 2)).'
</div>
<div class="col-lg-6">
<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>
</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>
<div class="col-lg-6">
<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>
</div>
</div>
</div>
<div class="alert alert-info">
'.$this->l('You can view order distribution below.').'
</p><br />
'.($totals['orderCount'] ? $this->engine(array('type' => 'pie', 'option' => '3-'.(int)Tools::getValue('id_country'))) : $this->l('No orders for this period.')).'</center>
<p><a class="button export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=3"><span>'.$this->l('CSV Export').'</span></a></p>
</div >
<br />
<div class="blocStats"><h2 class="icon-guide"><span></span>'.$this->l('Guide').'</h2>
<h2>'.$this->l('Various order statuses').'</h2>
<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="row row-margin-bottom">
<div class="col-lg-12">
<div class="col-lg-6">
'.($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">
<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 >';
return $this->_html;
}