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
dev-general@lists.oxidforge.org
http://dir.gmane.org/gmane.comp.php.oxid.general

Reply via email to