View Single Post
  #113  
Old 01-06-2009, 02:55 PM
 
donavichi donavichi is offline
 

X-Adept
  
Join Date: Apr 2004
Location: United Kingdom
Posts: 697
 

Default Re: Recently Viewed Mod

4.2 users will need to alter the product.tpl file to this:

Code:
<script type="text/javascript"> prodImage='<img src="{$product.image_url}"/>'; prodName='<{$product.product}>'; var p0=('<br/><a href="'+document.URL+'">'+prodImage+'<br/>{$product.product}</a><br/>ё{$product.taxed_price}<br/>'); </script>

to show images in the list, and alter recently_viewed.tpl to this:

Code:
{capture name=menu} <div class="recently"> {literal} <script type="text/javascript"> if (p0){ } else {var p0=null; } var p1=getCookie("p1"); var p2=getCookie("p2"); var p3=getCookie("p3"); var p4=getCookie("p4"); if (p1){ } else {document.write("You have no recently viewed items.") } if (p1 !=null) {document.write(p1)} if (p2) {document.write(p2)} if (p3) {document.write(p3)} if (p4) {document.write(p4)} if(p0 !=null && p0 != p1 && p0 != p2 && p0 != p3 && p0 !=p4){ setCookie("p1",p0) setCookie("p2",p1) setCookie("p3",p2) setCookie("p4",p3) } </script> {/literal} </div> {/capture} {include file="customer/menu_dialog.tpl" title="Recently Viewed" content=$smarty.capture.menu}

to get the 'menu' to display in home.tpl
__________________
Best regards,

Donavichi.
- - -

Website Copywriting || Web Design || FAQs || Home & Garden Blog
Reply With Quote