2014-04-11 25 views
2

我試圖確定有多少回頭客戶login無論是在結賬階段還是通過「My Account」。找出有多少客戶登錄到Magento

我特地在後臺與此相關的東西,但無法找到任何東西。

看起來很可能我必須爲'customer_customer_authenticated'事件創建一個觀察者並創建我自己的logs,除非其他人知道另一種方式?

感謝

回答

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();