Magento How long customer is inactive


/ Published in: PHP
Save to your folder(s)

How long customer is inactive ?


Copy this code and paste it in your HTML
  1. $customer = Mage::getSingleton('customer/session')->getCustomer();
  2. $log = Mage::getModel('log/customer')->load($customer->getId());
  3. $inctive_time = now() - $log->getLastVisitAt();

URL: http://magentocookbook.wordpress.com/category/magento-coding/

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.