Example #1
0
 /**
  * Add visitor and customer data to compare item
  *
  * @param Mage_Catalog_Model_Product_Compare_Item $item
  * @return Mage_Catalog_Model_Product_Compare_List
  */
 protected function _addVisitorToItem($item)
 {
     $item->addVisitorId(Mage::getSingleton('log/visitor')->getId());
     if (Mage::getSingleton('customer/session')->isLoggedIn()) {
         $item->addCustomerData(Mage::getSingleton('customer/session')->getCustomer());
     }
     return $this;
 }
Example #2
0
 /**
  * Add visitor and customer data to compare item
  *
  * @param Mage_Catalog_Model_Product_Compare_Item $item
  * @return Mage_Catalog_Model_Product_Compare_List
  */
 protected function _addVisitorToItem($item)
 {
     $item->addVisitorId(Mage::getSingleton('Mage_Log_Model_Visitor')->getId());
     if (Mage::getSingleton('Mage_Customer_Model_Session')->isLoggedIn()) {
         $item->addCustomerData(Mage::getSingleton('Mage_Customer_Model_Session')->getCustomer());
     }
     return $this;
 }