View Single Post
Old 01-25-2008, 02:58 PM
  Qdox's Avatar 
Qdox Qdox is offline

Advanced Member
Join Date: Jul 2007
Posts: 57

Thumbs up Re: Recently Viewed Mod

Nice addition to my collection of mods, Good Work.
For those interested to have it horizontally use this:

1- Add to skin1.css

/* Recently Viewed Items */
.recently {text-align:center;background-color:transparent}
.recently img {text-decoration:none;width:80px;height:auto;}
.recently a{text-decoration:none;color:black;}

2- Create the recently_viewed.tpl with this:
{capture name=menu}
<div class="recently">
<script type="text/javascript">
if (p0){
else {var p0=null;
var p1=getCookie2("p1");
var p2=getCookie2("p2");
var p3=getCookie2("p3");
var p4=getCookie2("p4");
if (p1){
else {document.write("You have no recently viewed items.")
if (p1 !=null) {document.write('<div class="box1">'+p1+'</div>')}
if (p2) {document.write('<div class="box2">'+p2+'</div>')}
if (p3) {document.write('<div class="box2">'+p3+'</div>')}
if (p4) {document.write('<div class="box3">'+p4+'</div>')}
if(p0 !=null && p0 != p1 && p0 != p2 && p0 != p3 && p0 !=p4){
{include file="dialog.tpl" dingbats="dingbats_categorie.gif" title="Recently Viewed" content=$ extra='width="100%"'}

Please note that I used the dialog.tpl instead of the menu.tpl. If you need to use the menu.tpl copy the code from the post#1.
Another I put my javascript functions on common.js, so I had to rename them.
X-Cart version 4.1.8 Pro
Web server Apache/2.0.52 (Red Hat)
Reply With Quote