View Single Post
  #36  
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
Quote:

/* 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;}
.box1{float:left;width:25%}
.box2{float:left;width:25%}
.box3{float:left;width:24%}

2- Create the recently_viewed.tpl with this:
Quote:
{capture name=menu}
<div class="recently">
{literal}
<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){
setCookie2("p1",p0);
setCookie2("p2",p1);
setCookie2("p3",p2);
setCookie2("p4",p3);
}
</script>
{/literal}
</div>
{/capture}
{include file="dialog.tpl" dingbats="dingbats_categorie.gif" title="Recently Viewed" content=$smarty.capture.menu 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.
__________________
QdoxGroup
X-Cart version 4.1.8 Pro
HandsOnWebHosting.
Web server Apache/2.0.52 (Red Hat)
http://www.justinthenet.com/
Reply With Quote