我想获取我客户的最后登录日期(在Magento上)。如何获取客户的最后登录日期
我做这样说:
$customer = Mage::getSingleton('customer/session')->getCustomer();
$logCustomer = Mage::getModel('log/customer')->load($customer->getId());
$lastVisited = $logCustomer->getLastVisitAt();
但它不工作,则结果为NULL
有一个名为我的数据库“customer_log”表,该表是空的! 此表具有“customer_id”和“login_at”列。
你知道我是否必须在后台激活一个选项才能使之有效?
谢谢,对不起我的英语不好。
nachito嗨, 对不起,我说的是 'customer_log',而不是 'log_customer'。 但是,此表在我的数据库中为空。没有条目。 奇怪,不是吗? – nverhoye
@ e-niki:是的,就像我说的我没有那张桌子,它可能来自第三方模块。你的完整版Magento是什么? – nachito
我的完整版本是1.3.2.3 – nverhoye