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
  #41  
Old 01-27-2008, 04:44 PM
 
sales@webosusa.com sales@webosusa.com is offline
 

Senior Member
  
Join Date: Nov 2007
Location: Australia
Posts: 118
 

Default Re: Recently Viewed Mod

Quote:
Originally Posted by Warwick
Is this working with 4.1.3? I tried it but can't get it to show any recent products ... any ideas?

And is it possible to get the "You have no recently viewed items." multi language as well, I tried to put {$lng.lbl_my_text} in the javascript but I'm sure that's not working.

That happen with me, but because didn't want to work anyways on the left side from home.tpl only above, middle, right, and bottle. Never on left.
__________________
Pedro
digitalnotions.i2u.shop
shop.modestclassy.com.au4.1.9 X-Cart
X-Cart
Business 5.3.6.0
Multi-vendor 5.3.6.0


Reply With Quote
  #42  
Old 01-27-2008, 05:24 PM
 
MoonDog MoonDog is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 93
 

Default Re: Recently Viewed Mod

pegpub and others,

Quote:

Any chance of modifying this so it will work in the left column? I have a 2 column layout and would love to have this feature.
For pegpub and those who have a two column layout or want to place the Recently Viewed mod on the left side, just do the following:

First of all, install the mod as outlined in Post #1 and placing the include recently_viewed.tpl anywhere in the left column in your home.tpl file.

Then create a file by copying the code below and name it recently_viewed_2.tpl and place it in the skin1/customer/main/ folder.
Code:
{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(p0 !=null && p0 != p1 && p0 != p2 && p0 != p3 && p0 !=p4){ setCookie("p1",p0) setCookie("p2",p1) setCookie("p3",p2) setCookie("p4",p3) } </script> {/literal}
And the last step is open the skin1/customer/home.tpl and find:
Code:
{include file="customer/home_main.tpl"}
And after that line place the following code:
Code:
{include file="customer/main/recently_viewed_2.tpl"}
Hopefully that should take care of the left column view problem.

NOTE: This modification is not needed if you place the Recently Viewed mod on the right column or in the middle column.

- MoonDog -
__________________
X-CART Gold v4.1.8
Reply With Quote
  #43  
Old 01-27-2008, 07:09 PM
 
pegpub pegpub is offline
 

Member
  
Join Date: May 2004
Location: Sherman, TX
Posts: 18
 

Default Re: Recently Viewed Mod

Moondog,

Thank you very much. Works like a charm now.
__________________
Scott Merritt
http://www.pegasuspublishing.com
x-Cart Gold v4.1.9
Detailed Product Image Replacing Thumbnail Mod
One Page Checkout Mod
DSEFU Mod
Ultimate Minicart Mod
Ultimate Speedbar Mod
Dynamic Images Mod (in progress)
CSS Rounded Corners Mod
3 Level Dynamic Category Mod
Recently Viewed Mod
v4.2.0 Gold test
Reply With Quote
  #44  
Old 01-27-2008, 08:39 PM
 
MoonDog MoonDog is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 93
 

Default Re: Recently Viewed Mod

pegpub,

Quote:

Thank you very much. Works like a charm now.
You're welcome. Glad you got it working.

- MoonDog -
__________________
X-CART Gold v4.1.8
Reply With Quote
  #45  
Old 01-28-2008, 12:00 AM
 
congiothoang congiothoang is offline
 

Newbie
  
Join Date: Sep 2007
Posts: 4
 

Default Re: Recently Viewed Mod

Works for me too ( and also with XC SEO installed ).


Thanks a lot for this great mod.
__________________
x-Cart Pro V4.1.8
Reply With Quote
  #46  
Old 01-28-2008, 03:08 AM
 
mike_turbo mike_turbo is offline
 

Advanced Member
  
Join Date: Oct 2007
Posts: 38
 

Default Re: Recently Viewed Mod

Quote:
Originally Posted by MoonDog
Hi mike_turbo,


Try this; repace the code you added in product.tpl with the following code:

Code:
<script type="text/javascript"> prodImage='<img src="{$product.tmbn_url}"/>'; prodName='<{$product.product}>'; var p0=('<br/><a href="'+document.URL+'">'+prodImage+'<br/>{$product.product}</a><br/>ё{$product.price}<br/>'); </script>
It's almost exactly like the code in post #1 except for the code highlited in red.

Let me know if this works for you.


- MoonDog -

Thanks for the update.

This is working fine except i am still getting

nullnullnull under the prices. Still got threads to read through so this may of been fixed lets hope so.
__________________
Version 4.1.9
Reply With Quote
  #47  
Old 01-28-2008, 10:05 PM
 
MoonDog MoonDog is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 93
 

Default Re: Recently Viewed Mod

congiothoang,

I'm happy to see you got it working.

mike_turbo,
Quote:

This is working fine except i am still getting nullnullnull under the prices.
See if this will work for you.
Find this code in recently_viewed.tpl:
Code:
if (p1 !=null) {document.write(p1)} if (p2) {document.write(p2)} if (p3) {document.write(p3)} if (p4) {document.write(p4)}
and edit it so it looks like this:
Code:
if (p1 !=null) {document.write(p1)} if (p2 !=null) {document.write(p2)} if (p3 !=null) {document.write(p3)} if (p4 !=null) {document.write(p4)}
I tried to recreate the null error you are getting so that I can troubleshoot it but I was unable to do so.
Hopefully as a longshot this will help.


- MoonDog -
__________________
X-CART Gold v4.1.8
Reply With Quote
  #48  
Old 01-29-2008, 12:07 AM
 
mike_turbo mike_turbo is offline
 

Advanced Member
  
Join Date: Oct 2007
Posts: 38
 

Default Re: Recently Viewed Mod

hi thanks.

Still not working.
__________________
Version 4.1.9
Reply With Quote
  #49  
Old 01-29-2008, 01:42 PM
  eaglemobiles's Avatar 
eaglemobiles eaglemobiles is offline
 

Senior Member
  
Join Date: Jan 2005
Posts: 167
 

Default Re: Recently Viewed Mod

Very good MOD THANKS MoonDog,

Every thing working but i am getiing $ sign for price how to change to ё.

Many THANKS
__________________
X-Cart Gold 4.3.2
X-Cart Gold 4.4.1
Unix

High Quality CCTV DVRs & Cameras
http://www.eaglemobiles.co.uk/CCTV
Reply With Quote
  #50  
Old 01-29-2008, 06:38 PM
 
MoonDog MoonDog is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 93
 

Default Re: Recently Viewed Mod

eaglemobiles,

Quote:

... i am getiing $ sign for price how to change to ё
In product.tpl find this line of code:
Code:
var p0=('<br/><a href="'+document.URL+'">'+prodImage+'<br/>{$product.product}</a><br/>${$product.taxed_price}<br/>');
Then replace the $ sign with the ё sign in front of {product.taxed_price} so it looks like this:
Code:
var p0=('<br/><a href="'+document.URL+'">'+prodImage+'<br/>{$product.product}</a><br/>ё{$product.taxed_price}<br/>');
I've highlighted the above currency code change in red.

- MoonDog -
__________________
X-CART Gold v4.1.8
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:47 PM.

   

 
X-Cart forums © 2001-2020