开发者

Magento get Last login

How can I get last login details in Magen开发者_运维百科to, as I am not getting anything using this code:

->joinTable('log/customer', 'customer_id=entity_id', array('logout_at'));


Try using left join instead

$collection->getSelect()->joinLeft(array('lc' => 'log_customer'), 'e.customer_id = lc.customer_id', array('logout_at' => 'logout_at'));

e.customer_id may in this case be main_table.customer_id

or

e.entity_id may in this case be main_table.entity_id


Use the following snippet to get the logged in customer:

Mage::getSingleton('customer/session')->getCustomer();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜