// Retro compatibility and updater improved for Discount/CartRules
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@9798 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
1 parent
71b77471de
commit
17a8dbc05b
21 files changed
+238
-275
No files matched your search
@@ -111,13 +111,13 @@ class StatsBestVouchers extends ModuleGrid
|
||||
|
||||
public function getData()
|
||||
{
|
||||
$this->_query = 'SELECT SQL_CALC_FOUND_ROWS od.name, COUNT(od.id_discount) as total, SUM(o.total_paid_real) / o.conversion_rate as ca
|
||||
FROM '._DB_PREFIX_.'order_discount od
|
||||
LEFT JOIN '._DB_PREFIX_.'orders o ON o.id_order = od.id_order
|
||||
$this->_query = 'SELECT SQL_CALC_FOUND_ROWS ocr.code, COUNT(ocr.id_cart_rule) as total, SUM(o.total_paid_real) / o.conversion_rate as ca
|
||||
FROM '._DB_PREFIX_.'order_cart_rule ocr
|
||||
LEFT JOIN '._DB_PREFIX_.'orders o ON o.id_order = ocr.id_order
|
||||
WHERE o.valid = 1
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_ORDER, 'o').'
|
||||
AND o.invoice_date BETWEEN '.$this->getDate().'
|
||||
GROUP BY od.id_discount';
|
||||
GROUP BY ocr.id_cart_rule';
|
||||
if (Validate::IsName($this->_sort))
|
||||
{
|
||||
$this->_query .= ' ORDER BY `'.$this->_sort.'`';
|
||||
|
||||
Reference in new issue
Block a user