Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Recently Viewed Mod

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions
 
Thread Tools Search this Thread
  #111  
Old 10-30-2008, 05:43 AM
 
Janel Janel is offline
 

Member
  
Join Date: Feb 2007
Location: Mitten Dweller
Posts: 27
 

Default Re: Recently Viewed Mod

anyone have any ideas on my previous post?

my site: http://www.blueowlstudio.com/shop/home.php
__________________
xcart ver. 4.1.11 gold
Reply With Quote
  #112  
Old 12-11-2008, 08:32 AM
  xcel's Avatar 
xcel xcel is offline
 

eXpert
  
Join Date: Nov 2008
Posts: 220
 

Default 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.
__________________
X-Cart Gold Plus 4.6.6

Altered Cart - Checkout One
Altered Cart - Checkout One Payments
Altered Cart - Cash Rewards
Altered Cart - On Sale

Smack Digital - CDSEO
Smack Digital - CDSEO Rich Snippets
Smack Digital - xCMS

The xCart Store - xBanners2

Star Plugins - Cloud Zoom

Heavily Customized by Starts Here Ltd. (UK)
Reply With Quote
  #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
  #114  
Old 01-06-2009, 03:38 PM
 
donavichi donavichi is offline
 

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

Default 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?
__________________
Best regards,

Donavichi.
- - -

Website Copywriting || Web Design || FAQs || Home & Garden Blog
Reply With Quote
  #115  
Old 01-24-2009, 12:04 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default 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.
__________________
4.6.1 Platinum


Reply With Quote
  #116  
Old 04-11-2009, 12:15 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default 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.
__________________
4.6.1 Platinum


Reply With Quote
  #117  
Old 04-27-2009, 07:23 AM
 
TanyaG TanyaG is offline
 

Advanced Member
  
Join Date: Nov 2007
Posts: 94
 

Default 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
__________________
Tanya

x-cart version: 4.1.7 4.1.9. 4.2
Reply With Quote
  #118  
Old 07-03-2009, 04:43 PM
 
royng royng is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 85
 

Default 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
__________________
X-Cart DB Version: 4.1.11 GOLD
Reply With Quote
  #119  
Old 07-07-2009, 04:48 AM
 
Learner Learner is offline
 

X-Adept
  
Join Date: Dec 2008
Posts: 807
 

Default 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.
__________________
4.6.1 Platinum


Reply With Quote
  #120  
Old 07-07-2009, 09:57 AM
 
royng royng is offline
 

Advanced Member
  
Join Date: Sep 2008
Posts: 85
 

Default Re: Recently Viewed Mod

I added, but the thumbnails not show.

How come?
__________________
X-Cart DB Version: 4.1.11 GOLD
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:43 PM.

   

 
X-Cart forums © 2001-2020