如何在Magento中获取最后的登录详细信息,因为我没有使用此代码获取任何内容:
->joinTable('log/customer', 'customer_id=entity_id', array('logout_at'));
答案 0 :(得分:1)
尝试使用左连接
$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
或
e.entity_id may in this case be main_table.entity_id
答案 1 :(得分:0)
使用以下代码段获取登录客户:
Mage::getSingleton('customer/session')->getCustomer();