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
  #31  
Old 01-24-2008, 11:05 PM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Default Re: Recently Viewed Mod

You have otherwise any idea why it wouldn't show recently viewed products?
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #32  
Old 01-24-2008, 11:24 PM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Default Re: Recently Viewed Mod

Could it be related to the fact that I use DSEFU PRO?
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #33  
Old 01-25-2008, 12:21 AM
 
MoonDog MoonDog is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 93
 

Default Re: Recently Viewed Mod

Warwick,
Quote:

You have otherwise any idea why it wouldn't show recently viewed products?
This mod works like this:
First of all, click on a product and view the product details.

Then select another product and then view the product details for this product.

Now look to see if you have an thumbnail, product title and product price displayed in your recently view box. If everything works it should display the first viewed product.

If nothing shows up, then make sure that you have cookies enabled in your browser. See post #27 how to turn it on.

Repeat the first two steps by reviewing two product details and see if there is anything now in the recently viewed box. If not, then most likely it's the code in your product.tpl file.

Make sure that you have used the product.tpl file and not the products.tpl file. The second file has the letter s after product.

Re-install the javascript code from post #1 to the very end of the product.tpl file. Make sure that there are no {literal} and {/literal} tags surrounding this code.

Now repeat the first two steps again to see if this works on the recently viewed box.

Hope this works.

Quote:

Could it be related to the fact that I use DSEFU PRO?
Since I don't use DSEFU PRO, I'm not sure if this is affecting this mod or not.
I do know that 01bodyjewellery from post #20 is using CDSEO and I think it's similar and it's not affecting his site.
Or maybe someone that uses DSEFU PRO and installed this mod can let us know if they have it working together.

Good luck.

- MoonDog -
__________________
X-CART Gold v4.1.8
Reply With Quote
  #34  
Old 01-25-2008, 12:41 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Default Re: Recently Viewed Mod

Thanks for all your help and efforts, I tried all more than once but simply can't get it to show any recently viewed products. Seems I have to pass this mod
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #35  
Old 01-25-2008, 10:29 AM
 
sales@webosusa.com sales@webosusa.com is offline
 

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

Default Re: Recently Viewed Mod

Works great now. Thanks!.

Cya!
__________________
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
  #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
  #37  
Old 01-26-2008, 08:58 AM
 
congiothoang congiothoang is offline
 

Newbie
  
Join Date: Sep 2007
Posts: 4
 

Default Re: Recently Viewed Mod

First, I want to say this is a great mod. Unfortunately, I can't get it to work. I thought becuase of XC SEO but when I disable XC SEO, it still not working (Plus, somebody else using the CD SEO and it works fine)

One more thing, I try to view source code of the product page and notice that there is no javascript display (notice that I did check to make sure that I place the code in correct file which is product.tpl )

THis piece of code did not display in the view source code:
{******************* Recently View Mods *********************}
<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.taxed_price}<br/>');
</script>
{******************* END Recently View Mods *********************}


If you guys can help me out, here is the link to my site:

http://www.loyalgifts.com


Thanks a lot for your help guys!
__________________
x-Cart Pro V4.1.8
Reply With Quote
  #38  
Old 01-26-2008, 09:03 AM
  Warwick's Avatar 
Warwick Warwick is offline
 

X-Adept
  
Join Date: Mar 2003
Location: Somewhere on the web through European connection
Posts: 868
 

Default Re: Recently Viewed Mod

Quote:
First, I want to say this is a great mod. Unfortunately, I can't get it to work. I thought becuase of XC SEO but when I disable XC SEO, it still not working (Plus, somebody else using the CD SEO and it works fine)
Similarity to me (also having trouble getting it to work) is that you have X-Cart Pro as well, maybe that is causing trouble, a long shot but who knows?
__________________
Installs: X-Cart 4.1.x - 4.4.x ∙∙ MySQL version: 5.0.45 ∙∙ Apache version: 2.2.8 (Unix) ∙∙ PHP version: 5.25
X-Cart add-ons: all ∙∙ Mods: A lot; too many ∙∙ Skin templates: Many
∙∙ Experience: Somewhere beyond newbie
-----------------------------------
------------------------------------------------------------------------------------------------------
Looking for the best dutch language pack? 4.1.x - 4.6.x compatibel, native speaker translation! More info
Reply With Quote
  #39  
Old 01-26-2008, 07:30 PM
 
MoonDog MoonDog is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 93
 

Default Re: Recently Viewed Mod

congiothoang and Warwick,

I think I found the problem that might be causing anything to display on the Recently View menu box. I was viewing congiothoang's source code to see what might be causing the problem and I noticed that the include recently_viewed file is called before the product.tpl is called. The product.tpl has the javascript code that is required for the recently_viewed to display the recently viewed product. Therefore, nothing is showing up.

So in order for the Recently Viewed mod to work, the menu box has to be located on the right side or at the bottom of the product page like in Qdox post #36. This mod will not work if it's located on the left side with the other menu boxes.

My sincere apology for those who had problems when installing this mod on the left side of their webpage. Try it on the right side or on the bottom and it should work.

I'll update post #1 to reflect this change.

On another note, I installed XC SEO and it's working perfectly with this mod.

I hope this fixes your problems.


- MoonDog -
__________________
X-CART Gold v4.1.8
Reply With Quote
  #40  
Old 01-27-2008, 09:58 AM
 
pegpub pegpub is offline
 

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

Default Re: Recently Viewed Mod

Moondog,

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.
__________________
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
Reply
   X-Cart forums > X-Cart 4 > Dev Questions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 05:21 AM.

   

 
X-Cart forums © 2001-2020