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')) if (Tools::getValue('export'))
$this->csvExport(array('layers' => 0, 'type' => 'line')); $this->csvExport(array('layers' => 0, 'type' => 'line'));
$this->_html = ' $this->_html = '
<div class="blocStats"><h2 class="icon-'.$this->name.'"><span></span>'.$this->displayName.'</h2> <div class="blocStats">
<ul> <div class="panel-heading">
<li> '.$this->l('Guide').'
'.$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/> </div>
'.$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> <div class="alert alert-info">
<li>'.$this->l('Total customer accounts:').' <span class="totalStats">'.$totalRegistrations.'</span></li> <h4>'.$this->l('Number of customer accounts created').'</h4>
</ul> <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>'.$this->engine(array('type' => 'line')).'</div> </div>
<p><a class="button export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1"><span>'.$this->l('CSV Export').'</span></a></p> <div class="panel-heading">
</div><br /> '.$this->l('How to act on the registrations\' evolution?').'
<div class="blocStats"><h2 class="icon-guide"><span></span>'.$this->l('Guide').'</legend> </div>
<h2>'.$this->l('Number of customer accounts created').'</h2> <div class="alert alert-info">
<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>
'.$this->l('If you let your shop run without changing anything, the number of customer registrations should stay stable or slightly decline.').' '.$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('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:').' '.$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('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> <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> </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; 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->csvExport(array('type' => 'pie', 'option' => '3-'.(int)Tools::getValue('id_country')));
$this->_html = ' $this->_html = '
<div class="blocStats"><h2 class="icon-'.$this->name.'"><span></span>'.$this->displayName.'</h2> <div class="blocStats">
<form action="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'" method="post" style="float: right; margin-left: 10px;"> <div class="panel-heading">
<select name="id_country"> '.$this->l('Guide').'
<option value="0"'.((!Tools::getValue('id_order_state')) ? ' selected="selected"' : '').'>'.$this->l('All').'</option>'; </div>
foreach (Country::getCountries($this->context->language->id) AS $country) <div class="alert alert-info">
$this->_html .= '<option value="'.$country['id_country'].'"'.(($country['id_country'] == Tools::getValue('id_country')) ? ' selected="selected"' : '').'>'.$country['name'].'</option>'; <h4>'.$this->l('Various order statuses').'</h4>
$this->_html .= '</select> <p>
<input type="submit" name="submitCountry" value="'.$this->l('Filter').'" class="button" /> '.$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> </form>
<p><img src="../img/admin/down.gif" /> <div class="row row-margin-bottom">
'.$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.').' <div class="col-lg-12">
</p> <div class="col-lg-6">
<p>'.$this->l('Orders placed:').' <span class="totalStats">'.(int)($totals['orderCount']).'</span></p> '.$this->engine(array('type' => 'line', 'option' => '1-'.(int)Tools::getValue('id_country'), 'layers' => 2)).'
<p>'.$this->l('Products bought:').' <span class="totalStats">'.(int)($totals['products']).'</span></p> </div>
<div>'.$this->engine(array('type' => 'line', 'option' => '1-'.(int)Tools::getValue('id_country'), 'layers' => 2)).'</div> <div class="col-lg-6">
<p><a class="button export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=1"><span>'.$this->l('CSV Export').'</span></a></p> <ul class="list-unstyled">
<h4>'.$this->l('Sales:').' '.Tools::displayPrice($totals['orderSum'], $currency).'</h4> <li>'.$this->l('Orders placed:').' <span class="totalStats">'.(int)($totals['orderCount']).'</span></li>
<div>'.$this->engine(array('type' => 'line', 'option' => '2-'.(int)Tools::getValue('id_country'))).'</div> <li>'.$this->l('Products bought:').' <span class="totalStats">'.(int)($totals['products']).'</span></li>
<p><a class="button export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=2"><span>'.$this->l('CSV Export').'</span></a></p> <li>
<p class="space"><img src="../img/admin/down.gif" /> <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.').' '.$this->l('You can view order distribution below.').'
</p><br /> </div>
'.($totals['orderCount'] ? $this->engine(array('type' => 'pie', 'option' => '3-'.(int)Tools::getValue('id_country'))) : $this->l('No orders for this period.')).'</center> <div class="row row-margin-bottom">
<p><a class="button export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=3"><span>'.$this->l('CSV Export').'</span></a></p> <div class="col-lg-12">
</div > <div class="col-lg-6">
<br /> '.($totals['orderCount'] ? $this->engine(array('type' => 'pie', 'option' => '3-'.(int)Tools::getValue('id_country'))) : $this->l('No orders for this period.')).'</center>
<div class="blocStats"><h2 class="icon-guide"><span></span>'.$this->l('Guide').'</h2> </div>
<h2>'.$this->l('Various order statuses').'</h2> <div class="col-lg-6">
<p> <a class="btn btn-default export-csv" href="'.Tools::safeOutput($_SERVER['REQUEST_URI']).'&export=3">
'.$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 /> <i class="icon-cloud-upload"></i> '.$this->l('CSV Export').'
'.$this->l('These order statuses cannot be removed from the Back Office, however you have the option to add more.').' </a>
</p> </div>
</div>
</div>
</div >'; </div >';
return $this->_html; return $this->_html;
} }