// Fix Shop::SHARE_ORDER and Shop::SHARE_CUSTOMER on statistics
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@7959 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -81,7 +81,7 @@ class StatsNewsletter extends ModuleGraph
|
||||
$sql = 'SELECT COUNT(*) as customers
|
||||
FROM `'._DB_PREFIX_.'customer`
|
||||
WHERE 1
|
||||
'.$this->sqlShopRestriction(true).'
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_CUSTOMER).'
|
||||
AND `newsletter_date_add` BETWEEN '.ModuleGraph::getDateBetween();
|
||||
$result1 = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow($sql);
|
||||
|
||||
@@ -103,13 +103,13 @@ class StatsNewsletter extends ModuleGraph
|
||||
$this->_query = 'SELECT newsletter_date_add
|
||||
FROM `'._DB_PREFIX_.'customer`
|
||||
WHERE 1
|
||||
'.$this->sqlShopRestriction(true).'
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_CUSTOMER).'
|
||||
AND `newsletter_date_add` BETWEEN ';
|
||||
|
||||
$this->_query2 = 'SELECT newsletter_date_add
|
||||
FROM '._DB_PREFIX_.'newsletter
|
||||
WHERE 1
|
||||
'.$this->sqlShopRestriction(true).'
|
||||
'.$this->sqlShopRestriction(Shop::SHARE_CUSTOMER).'
|
||||
AND `newsletter_date_add` BETWEEN ';
|
||||
$this->setDateGraph($layers, true);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user