get user viewed products from his Cookie or Session in magento -
i want user viewed products in magento.is possible.like on start show empty data view product want products info , show user.any clue or guidelines appreciated .thanks
you can have modification in following class. better extend it.
mage_catalog_productcontroller -> viewaction()
$myvalue = $productid; mage::getsingleton('core/session')->setmyvalue($myvalue);
to retrieve:
$myvalue=mage::getsingleton('core/session')->getmyvalue();
to unset:
mage::getsingleton('core/session')->unsmyvalue();
for array:
mage::getsingleton('core/session')->setdata('yourarray',array(1,2,3));
other way. here $value can array/object
mage::getsingleton('core/session')->setxxx(serialize($value)); …… $value = unserialize(mage::getsingleton('core/session')->getxxx());
look here more info
Comments
Post a Comment