This commit is contained in:
rGaillard
2011-07-06 10:10:43 +00:00
parent 31d94236ac
commit d1a13007b9
4695 changed files with 0 additions and 339293 deletions
-11
View File
@@ -1,11 +0,0 @@
<?xml version="1.0" encoding="UTF-8" ?>
<module>
<name>statsbestmanufacturers</name>
<displayName>Best manufacturers</displayName>
<version>1.0</version>
<description>A list of the best manufacturers</description>
<author>PrestaShop</author>
<tab>analytics_stats</tab>
<is_configurable>0</is_configurable>
<need_instance>1</need_instance>
</module>
-13
View File
@@ -1,13 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_4f29d8c727dcf2022ac241cb96c31083'] = 'Ausgabe Aufnahmeeinstellungen leer';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_eab2b4237a7cd89c309119e35f62d168'] = 'Anzeige';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_8bf8854bebe108183caeb845c7676ae4'] = 'von';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_49ee3087348e8d44e1feda1917443987'] = 'Name';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_2a0440eec72540c5b30d9199c01f348c'] = 'Verkaufte Menge';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_ea067eb37801c5aab1a1c685eb97d601'] = 'Bezahlter Gesamtbetrag';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_72fd9b5482201824daae557360d91196'] = 'Beste Hersteller';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_aa1b814546fe3e2e96ef3a185e4df8e9'] = 'Eine Liste der besten Hersteller';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_998e4c5c80f27dec552e99dfed34889a'] = 'CSV-Export';
-4
View File
@@ -1,4 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
-13
View File
@@ -1,13 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_4f29d8c727dcf2022ac241cb96c31083'] = 'Empty recordset returned';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_eab2b4237a7cd89c309119e35f62d168'] = 'Mostrar';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_8bf8854bebe108183caeb845c7676ae4'] = 'de';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_49ee3087348e8d44e1feda1917443987'] = 'Nombre';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_2a0440eec72540c5b30d9199c01f348c'] = 'Cantidad vendida';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_ea067eb37801c5aab1a1c685eb97d601'] = 'Total pagado';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_72fd9b5482201824daae557360d91196'] = 'Mejores fabricantes';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_aa1b814546fe3e2e96ef3a185e4df8e9'] = 'Lista de los mejores fabricantes';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_998e4c5c80f27dec552e99dfed34889a'] = 'CSV Export';
-13
View File
@@ -1,13 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_4f29d8c727dcf2022ac241cb96c31083'] = 'Empty recordset returned';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_eab2b4237a7cd89c309119e35f62d168'] = 'Affichage';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_8bf8854bebe108183caeb845c7676ae4'] = 'de';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_49ee3087348e8d44e1feda1917443987'] = 'Nom';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_2a0440eec72540c5b30d9199c01f348c'] = 'Quantité vendus ';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_ea067eb37801c5aab1a1c685eb97d601'] = 'Total des sommes versées ';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_72fd9b5482201824daae557360d91196'] = 'Meilleur fabricants ';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_aa1b814546fe3e2e96ef3a185e4df8e9'] = 'Une liste des meilleurs fabricants ';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_998e4c5c80f27dec552e99dfed34889a'] = 'Export CSV';
-13
View File
@@ -1,13 +0,0 @@
<?php
global $_MODULE;
$_MODULE = array();
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_4f29d8c727dcf2022ac241cb96c31083'] = 'recordset vuoto restituito';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_eab2b4237a7cd89c309119e35f62d168'] = 'Visualizzazione';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_8bf8854bebe108183caeb845c7676ae4'] = 'di';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_49ee3087348e8d44e1feda1917443987'] = 'Nome';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_2a0440eec72540c5b30d9199c01f348c'] = 'Quantità venduta';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_ea067eb37801c5aab1a1c685eb97d601'] = 'Totale pagato';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_72fd9b5482201824daae557360d91196'] = 'Migliori produttori';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_aa1b814546fe3e2e96ef3a185e4df8e9'] = 'Elenco dei migliori produttori';
$_MODULE['<{statsbestmanufacturers}prestashop>statsbestmanufacturers_998e4c5c80f27dec552e99dfed34889a'] = 'Esporta CSV ';
Binary file not shown.

Before

Width:  |  Height:  |  Size: 641 B

@@ -1,145 +0,0 @@
<?php
/*
* 2007-2011 PrestaShop
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to license@prestashop.com so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade PrestaShop to newer
* versions in the future. If you wish to customize PrestaShop for your
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <contact@prestashop.com>
* @copyright 2007-2011 PrestaShop SA
* @version Release: $Revision: 1.4 $
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*/
if (!defined('_CAN_LOAD_FILES_'))
exit;
class StatsBestManufacturers extends ModuleGrid
{
private $_html = null;
private $_query = null;
private $_columns = null;
private $_defaultSortColumn = null;
private $_emptyMessage = null;
private $_pagingMessage = null;
function __construct()
{
$this->name = 'statsbestmanufacturers';
$this->tab = 'analytics_stats';
$this->version = '1.0';
$this->author = 'PrestaShop';
$this->_defaultSortColumn = 'sales';
$this->_emptyMessage = $this->l('Empty recordset returned');
$this->_pagingMessage = $this->l('Displaying').' {0} - {1} '.$this->l('of').' {2}';
$this->_columns = array(
array(
'id' => 'name',
'header' => $this->l('Name'),
'dataIndex' => 'name',
'align' => 'left',
'width' => 200
),
array(
'id' => 'quantity',
'header' => $this->l('Quantity sold'),
'dataIndex' => 'quantity',
'width' => 60,
'align' => 'right'
),
array(
'id' => 'sales',
'header' => $this->l('Total paid'),
'dataIndex' => 'sales',
'width' => 60,
'align' => 'right'
)
);
parent::__construct();
$this->displayName = $this->l('Best manufacturers');
$this->description = $this->l('A list of the best manufacturers');
}
public function install()
{
return (parent::install() AND $this->registerHook('AdminStatsModules'));
}
public function hookAdminStatsModules($params)
{
$engineParams = array(
'id' => 'id_category',
'title' => $this->displayName,
'columns' => $this->_columns,
'defaultSortColumn' => $this->_defaultSortColumn,
'emptyMessage' => $this->_emptyMessage,
'pagingMessage' => $this->_pagingMessage
);
if (Tools::getValue('export'))
$this->csvExport($engineParams);
$this->_html = '
<fieldset class="width3"><legend><img src="../modules/'.$this->name.'/logo.gif" /> '.$this->displayName.'</legend>
'.ModuleGrid::engine($engineParams).'
<br /><a href="'.$_SERVER['REQUEST_URI'].'&export=1"><img src="../img/admin/asterisk.gif" />'.$this->l('CSV Export').'</a>
</fieldset>';
return $this->_html;
}
public function getTotalCount()
{
return Db::getInstance()->getValue('
SELECT COUNT(DISTINCT(m.id_manufacturer))
FROM '._DB_PREFIX_.'order_detail od
LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = od.product_id)
LEFT JOIN '._DB_PREFIX_.'orders o ON (o.id_order = od.id_order)
LEFT JOIN '._DB_PREFIX_.'manufacturer m ON (m.id_manufacturer = p.id_manufacturer)
WHERE o.invoice_date BETWEEN '.$this->getDate().' AND o.valid = 1
AND m.id_manufacturer IS NOT NULL');
}
public function getData()
{
$this->_totalCount = $this->getTotalCount();
$this->_query = '
SELECT m.name, SUM(od.product_quantity) as quantity, ROUND(SUM(od.product_quantity * od.product_price) / c.conversion_rate, 2) as sales
FROM '._DB_PREFIX_.'order_detail od
LEFT JOIN '._DB_PREFIX_.'product p ON (p.id_product = od.product_id)
LEFT JOIN '._DB_PREFIX_.'orders o ON (o.id_order = od.id_order)
LEFT JOIN '._DB_PREFIX_.'currency c ON (c.id_currency = o.id_currency)
LEFT JOIN '._DB_PREFIX_.'manufacturer m ON (m.id_manufacturer = p.id_manufacturer)
WHERE o.invoice_date BETWEEN '.$this->getDate().' AND o.valid = 1
AND m.id_manufacturer IS NOT NULL
GROUP BY p.id_manufacturer';
if (Validate::IsName($this->_sort))
{
$this->_query .= ' ORDER BY `'.$this->_sort.'`';
if (isset($this->_direction) AND Validate::IsSortDirection($this->_direction))
$this->_query .= ' '.$this->_direction;
}
if (($this->_start === 0 OR Validate::IsUnsignedInt($this->_start)) AND Validate::IsUnsignedInt($this->_limit))
$this->_query .= ' LIMIT '.$this->_start.', '.($this->_limit);
$this->_values = Db::getInstance()->ExecuteS($this->_query);
}
}