找出有多少客户登录Magento

时间:2014-04-11 08:36:41

标签: magento

我正在尝试确定有多少回访客户login进入他们的帐户,无论是在结帐阶段还是只是通过“My Account”。

我在后端找到了与此相关的内容但找不到任何内容。

看起来我可能需要为'customer_customer_authenticated'事件创建一个观察者并创建我自己的logs,除非其他人知道另一种方式?

由于

1 个答案:

答案 0 :(得分:0)

您可以观看/观察customer_login事件。

来自Session.phplogin($username, $password)

00161     {
00162         $customer = Mage::getModel('customer/customer')
00163             ->setWebsiteId(Mage::app()->getStore()->getWebsiteId());
00164 
00165         if ($customer->authenticate($username, $password)) {
00166             $this->setCustomer($customer);
00167             Mage::dispatchEvent('customer_login', array('customer'=>$customer));
00168             return true;
00169         }
00170         return false;
00171     }

只需在观察者身上记录Mage::app()->getRequest()->getReferer();和/或Mage::app()->getRequest()->getRequestUri();