Когда захожу в Панель Управления >> Статистика >> Модули>рассылка, то там только
SELECT COUNT(*) as visitors
FROM ps_newsletter n
WHERE n.`date_add` BETWEEN '2010-01-17 00:00:00' AND '2010-01-17 23:59:59'
В statsnewsletter/statsnewsletter.php
Код:
private function getTotals()
{
$result1 = Db::getInstance()->getRow('
SELECT COUNT(*) as customers
FROM `'._DB_PREFIX_.'customer` c
WHERE c.`newsletter_date_add` BETWEEN '.ModuleGraph::getDateBetween());
$result2 = Db::getInstance()->getRow('
SELECT COUNT(*) as visitors
FROM '._DB_PREFIX_.'newsletter n
WHERE n.`date_add` BETWEEN '.ModuleGraph::getDateBetween());
return array('customers' => $result1['customers'], 'visitors' => $result2['visitors'], 'both' => $result1['customers'] + $result2['visitors']);
}
заменить на
Код:
private function getTotals()
{
$result1 = Db::getInstance()->getRow('
SELECT COUNT(*) as customers
FROM `'._DB_PREFIX_.'customer` c
WHERE c.`newsletter_date_add` BETWEEN '.ModuleGraph::getDateBetween());
$result2 = Db::getInstance()->getRow('
SELECT COUNT(*) as visitors
FROM '._DB_PREFIX_.'newsletter n
WHERE n.`newsletter_date_add` BETWEEN '.ModuleGraph::getDateBetween());
return array('customers' => $result1['customers'], 'visitors' => $result2['visitors'], 'both' => $result1['customers'] + $result2['visitors']);
}