Jump to content

Help creating an Recent View Item


smallc28

Recommended Posts

You'll could add product A to the $_SESSION, for now we'll call this var $_SESSION['recently_viewed'].

 

So when the user is viewing a product, add its data to this variable.

$_SESSION['recently_viewed'] = <products data here>

To display recently viewed item you'd do something like

if(isset($_SESSION['recently_vieweded']))
{
   // display recently viewed item data here
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.