Here's a little plug in I made (with shane's help) that keeps track of recently viewed products via a separate cookie. It then shows the products as clickable thumbnails. I use this in the bottom slot of my theme.
It's not perfect (for some reason it keeps adding the same product after it has already been added to the cookie) but it is close.
<%@ Register TagPrefix="NP" Namespace="NetPoint.WebControls" Assembly="NetPoint.WebControls" %>
<%@ Control Language="c#" AutoEventWireup="false" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Import Namespace="netpoint.api" %>
<%@ Import Namespace="netpoint.api.catalog" %>
<%@ Import Namespace="netpoint.classes" %>
<%
{
NPBasePage bp = (NPBasePage)Page;
if (Request.QueryString["partno"] != null){
if (Request.Cookies["webtoolsLastItem"] != null){
string ProductSearchCookie = (Request.Cookies["webtoolsLastItem"]).Value;
char[] splitter = {','};
string [] productCookieSearchSplit = ProductSearchCookie.Split(splitter);
for(int x = 0; x < productCookieSearchSplit.Length; x++)
{
if (productCookieSearchSplit[x] == Request.QueryString["partno"]){
}
else {
string ProductVisistedCookie = (Request.Cookies["webtoolsLastItem"]).Value + ',' + (Request.QueryString["PartNo"]);
Response.Cookies["webtoolsLastItem"].Value = ProductVisistedCookie;
Response.Cookies["webtoolsLastItem"].Expires = DateTime.Now.AddDays(10000);
}}}
else {
Response.Cookies["webtoolsLastItem"].Value = (Request.QueryString["partno"]);
Response.Cookies["webtoolsLastItem"].Expires = DateTime.Now.AddDays(10000);
}
}
if (Request.Cookies["webtoolsLastItem"] != null){
NPBasePage bp1 = (NPBasePage)Page;
string ProductShowCookie = (Request.Cookies["webtoolsLastItem"]).Value;
char[] splitter = {','};
string [] productCookieSplit = ProductShowCookie.Split(splitter);
Response.Write("<br><br><strong>Recently Viewed Products:</strong> <br>");
for(int x = 0; x < productCookieSplit.Length; x++)
{
NPPart part = new NPPart(productCookieSplit[x]);
Response.Write(
"<a href='" + Request.Url.GetLeftPart(UriPartial.Authority) + "/catalog/partdetail.aspx?PartNo=" + productCookieSplit[x] + "'><img src='" + bp.ProductThumbImage + part.ThumbNail +"' border='0'></a>");
}
}
}
%>