X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing and adding new features (https://forum.x-cart.com/forumdisplay.php?f=20)
-   -   Recently Viewed Mod (https://forum.x-cart.com/showthread.php?t=36753)

Janel 10-30-2008 05:43 AM

Re: Recently Viewed Mod
 
anyone have any ideas on my previous post? :(

my site: http://www.blueowlstudio.com/shop/home.php

xcel 12-11-2008 08:32 AM

Re: Recently Viewed Mod
 
moondog...

thanks for the mod. got it work on the first try. your instructions were perfectly detailed. i did notice as i was testing this, that so far 1 image that is now displayed in the r.v. box, is NOT the thumbnail like the others. is there are way to put image resizing in this mod? or least have it actually pull the thumbnail?

not sure why that one particular image is pulling the 'product image' and not the 'thumbnail'.

anywho, thanks again for the mod. take care.

donavichi 01-06-2009 02:55 PM

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

donavichi 01-06-2009 03:38 PM

Re: Recently Viewed Mod
 
I am also getting the same problem, previously mentioned a few times and currently with no solution, if anyone could be so bold as to provide the solution:

currently if no recently viewed products, you get 'you have no recent...' as intended.
if you have 1 recently viewed product, the mod works - shows the thumb, title and price of the recently viewed product, but retruns 'undefinedundefinedundefined' underneath.
if you have 2 recently viewed products, you get 'undefinedundefined' underneath.
if you have 3 recently viewed products, you get 'undefined' underneath.
if you have 4 recently viewed products, you get nothing underneath.

this has been referred to as nullnullnull, nullnull and null in previous posts.

anyone got the definitive answer please?

Learner 01-24-2009 12:04 AM

Re: Recently Viewed Mod
 
Hi,

Anyone or anybody answer me, is it test on X-Cart Pro 4.1.9 & X-Cart Pro 4.1.11 ?

Any help/inputs on this would be highly appreciated.


Thanks to all.

Learner 04-11-2009 12:15 AM

Re: Recently Viewed Mod
 
Hi MoonDog,
Thanks for this codes.Now It works fine for me.

1)But instead of an empty Recently View box, NOT show it at all until there's been some products view. "if products have been viewed, show "Recently View" box, else, don't show it yet".
2) Is it possible to display in central area after featured products on home page horizontally( Minimum 3 in a row)?

How do I do that?

Can anyone help me?

Thanks to all again.

TanyaG 04-27-2009 07:23 AM

Re: Recently Viewed Mod
 
Brilliant mode, thanks a lot for sharing. One thing I need to change. How can I hide recently_viewed.tpl if its no recently viewed product available?

Did anybody test it in IE 6?

Many thanks

royng 07-03-2009 04:43 PM

Re: Recently Viewed Mod
 
Moondog, you are awesome,

I am not a programmer and I am modifying 4.1.11.

My boss making me modify his xcart.

If I mess this up, he will kill me.

So, I just need to follow the code that you provide on post #1 and it should be working right?

customer/home.tpl

add these two lines of code in home.tpl

Add the following code to the end of your customer/main/product.tpl

Create a customer/main/recently_viewed.tpl file by using the following code:

And finally, add the following code to the end of your skin1.css file:

Also you mention, the file "news.tpl", is that for new product? I love to have it on the site too.

By any chance do you know how to add
"Let Customer choose number of products displayed on page"
I read the forum, and still not getting it.

http://forum.x-cart.com/showthread.php?t=38695&highlight=view+all

I want to add "<pres/ 1 2 3 4 / next> view all" and a drop down

Products
10
20
30
40
50
All

Please please please help me!

Thanks in advance. You can email me at royng2003@yahoo.com

Roy

Learner 07-07-2009 04:48 AM

Re: Recently Viewed Mod
 
Is it possible to display in central area after featured products on home page horizontally( Minimum 3 in a row)?

Any help from forum!!! Can anyone help me?

Thanks to all.

royng 07-07-2009 09:57 AM

Re: Recently Viewed Mod
 
I added, but the thumbnails not show.

How come?


All times are GMT -8. The time now is 04:43 AM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.