Hi Sai Chandra Sekhar.M, IMO, you made it more complicate as it is: this feature already exists but is probably not shown in azure template. Switch over to basic and enjoy ;)
Regards Marco ________________________________ From: [email protected] [[email protected]] on behalf of Sai Chandra Sekhar Madala [[email protected]] Sent: Tuesday, June 19, 2012 4:52 PM To: [email protected] Subject: [oxid-dev-general] Recent Viewed Products Dear All, I have a requirement where I have to show the recent viewed products.I have tried to implement this through a module. First I have stored the ox-id's of the viewed products inside a session variable and retrieved them and created an object and loaded the product using load function. 1) This is the code in details.php for storing session variable. if(isset($_SESSION['views'])) $_SESSION['views']=$_SESSION['views'].",".$oProduct->oxarticles__oxid->value; else $_SESSION['views']=$oProduct->oxarticles__oxid->value; 2) Then I have used the below code in Module public function getrecentviewproduct(){ $i=0; if($procoxid = oxSession::getVar('views')){ $sOxid = explode("," , $procoxid); foreach($sOxid as $procid){ $oArt = oxNew('oxarticle'); $oArt->load($procid); $oArtList[$i] = $oArt; $i++; } return $oArtList; } return null; } This module when registered with start class works fine in start page,but our requirement is that it should work through out the shop. Please suggest which class has to be extended so that the above will work through out the shop. Thanks & Regards, Sai Chandra Sekhar.M, Devblaze Inc.
_______________________________________________ dev-general mailing list [email protected] http://dir.gmane.org/gmane.comp.php.oxid.general
