Contributions
customers stats orders
Statistics module to know the average customers having made several orders and medium baskets.
Calculation can be done on all the orders, you can restrict over one year or a precise month, you can choose the number of customers who already ordered more than 1, 2, 3, 10... orders. You can mask the order in a pecific status or display only the orders in a specific status.
Statistics:
- the number of orders
- the number of new customers registered over the period
- the number of customer having bought (and % compared to the registered)
- the number of customers having made several purchases (1 to 20 and % compared to the purchasers)
- stats on the orders (Total sales, shipping, taxes...)
- the average sale included taxes
- the average basket of products exclued taxes
hope it will help you ;)
Module de statistiques pour connaître les clients ayant fait plusieurs commandes et les paniers moyens.
Le calcul peut se faire sur toutes les commandes, on peut restreindre le calcul sur une année ou un mois précis, on peut afficher le nombre de clients qui ont déjà passé plus de 1, 2, 3, 10... commandes. On peut masquer les commandes dans un état donné ou n'afficher que les commandes dans un état.
Les statistiques:
- Le nombre de commandes
- Le nombre de nouveaux clients inscrits sur la période
- Le nombre de client ayant acheté (et le % par rapport aux inscrits)
- Le nombre de clients ayant fait plusieurs achats (1 à 20 et le % par rapport aux acheteurs)
- des stats sur les commandes (Total ventes, frais d'envoi, taxes...)
- la vente moyenne tout compris
- le panier moyen d'articles HT.
Expand All / Collapse All
Fixes all bug, including division by zero in TOTAL and AVERAGE BASKET.
Spanish translation has been edited, too.
Just replace (near line 166)
$tot_HT = ($tot_sale['total']-$tot_shipping['total'])*(1-($tot_taxes['total']/$tot_sale['total']));
by
if($tot_sale['total'] == 0){
$tot_HT = 0;
$tot_sale['total'] = 0;
}else{
$tot_HT = ($tot_sale['total']-$tot_shipping['total'])*(1-($tot_taxes['total']/$tot_sale['total']));
}
I think now it works
While it's true that a divide by zero error occurs on months with $0 in sales, Varentino's fix corrects that problem but the TOTAL and AVERAGE BASKET entries no longer work.
This is the most recent file incorporating other fixes but excluding Varentino's fix (therefore, it is still subject to the divide by zero error).
When entering the page, a default selection made (current month, current year) but the dropdowns are set at 'all'. This small fix preselects the correct default.
Replace lines 212-213 with
<td class="main" align="center"><?php echo tep_draw_pull_down_menu('month', array_merge(array(array('id' => 'ALL', 'text' => TEXT_ALL_MOIS)), $list_month_array), $month, 'onChange="this.form.submit();"');?> </td>
<td class="main" align="center"><?php echo tep_draw_pull_down_menu('year', array_merge(array(array('id' => 'ALL', 'text' => TEXT_ALL_ANNEE)), $list_year_array), $year, 'onChange="this.form.submit();"'); ?> </td>
In catalog/admin/includes/languages/espanol/stats_customers_orders.php
Search:
define('JUI', 'Junio');
Replace by,
define('JUN', 'Junio');
Fix error when monthly order = 0
/**in stats_customers_orders.php **/
find (166)
$tot_HT = ($tot_sale['total']-$tot_shipping['total'])*(1-($tot_taxes['total']/$tot_sale['total']));
replace with
if($tot_HT!=0){
$tot_HT = ($tot_sale['total']-$tot_shipping['total'])*(1-($tot_taxes['total']/$tot_sale['total']));
}else{
$tot_HT = 0;
}
********************************
Added Danish language support, and fixed a small typo in the english language file..
Full package incuding Dutch language based on v1.2c
Volledige versie inclusief Nederlands gebaseerd op v1.2c
The total price still wasn't displayed correct.
It now displays the correct value, regardless of if you have different tax values and/or showing your products with/without tax in your shop.
Also added swedish language.
- Italian language version
- versione italiana file di lingua
Korrigierte und sinngemässe Übersetzung der Contribution.
only correct the total without taxes (first version was wrong if you're using fixed_payment_charges for exemple) and add a round() to display a correct total taxes
full package with ieuflr2000 and webistefan traductions.
Complete pack.
Frenchman, Englishman, Spaniard and German
Thank you has Xaglo and Webistefan
------------
Pack complet.
Français, Anglais, Espagnol et Allemand
Merci a Xaglo et Webistefan
http://ieuflr2000.dyndns.org
Test
stats_customer_order einfach in Verzeichniss Admin/Includes/languages/german
Die Beschriftung ist nun in Deutsch
Correct an error in the statistics of customers having bought
Add a statistic on the NEW customers having bought
Automatisation of the drop-down for the years
------
Corrige une erreur dans les statistiques de client ayant acheté
Ajout d'une statistique sur les NOUVEAUX clients ayant acheté
Automatisation du menu déroulant des années
Statistics module to know the average customers having made several orders and medium baskets.
Calculation can be done on all the orders, you can restrict over one year or a precise month, you can choose the number of customers who already ordered more than 1, 2, 3, 10... orders. You can mask the order in a pecific status or display only the orders in a specific status.
Statistics:
- the number of orders
- the number of new customers registered over the period
- the number of customer having bought (and % compared to the registered)
- the number of customers having made several purchases (1 to 20 and % compared to the purchasers)
- stats on the orders (Total sales, shipping, taxes...)
- the average sale included taxes
- the average basket of products exclued taxes
hope it will help you ;)
Module de statistiques pour connaître les clients ayant fait plusieurs commandes et les paniers moyens.
Le calcul peut se faire sur toutes les commandes, on peut restreindre le calcul sur une année ou un mois précis, on peut afficher le nombre de clients qui ont déjà passé plus de 1, 2, 3, 10... commandes. On peut masquer les commandes dans un état donné ou n'afficher que les commandes dans un état.
Les statistiques:
- Le nombre de commandes
- Le nombre de nouveaux clients inscrits sur la période
- Le nombre de client ayant acheté (et le % par rapport aux inscrits)
- Le nombre de clients ayant fait plusieurs achats (1 à 20 et le % par rapport aux acheteurs)
- des stats sur les commandes (Total ventes, frais d'envoi, taxes...)
- la vente moyenne tout compris
- le panier moyen d'articles HT.
Note: Contributions are used at own risk.