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 > Changing and adding new features
 
Thread Tools Search this Thread
  #21  
Old 01-23-2008, 03:22 PM
 
sales@webosusa.com sales@webosusa.com is offline
 

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

Talking Re: Recently Viewed Mod

I manage put together. This is for who use tables as well.

The code below
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.taxed_price}<br/>'); </script> ==================================================
But before right after the last DIV tag before the {/if} that you made for the tables like below
Code:
================================================== .... <div class="tabber" id="mytabber"> {if $active_modules.Magnifier ne "" && ($config.Magnifier.magnifier_image_popup ne 'Y' || $js_enabled ne 'Y')} <div class="tabbertab"> <h2>Product Magnifier</h2> {include file="modules/Magnifier/product_magnifier.tpl" productid=$product.productid} </div> {/if} {if $config.Appearance.send_to_friend_enabled eq 'Y'} <div class="tabbertab"> <h2>{$lng.lbl_send_to_friend}</h2> {include file="customer/main/send_to_friend.tpl" } </div> {/if} {if $active_modules.Detailed_Product_Images ne "" && ($config.Detailed_Product_Images.det_image_popup ne 'Y' || $js_enabled ne 'Y')} <div class="tabbertab"> <h2>{$lng.lbl_detailed_images}</h2> {include file="modules/Detailed_Product_Images/product_images.tpl" }</div> {/if} <div class="tabbertab" id="description"> <h2>{$lng.lbl_full_description}</h2> {include file="customer/main/full_description.tpl"}</div> <div class="tabbertab"> <h2>{$lng.lbl_more_tabs}</h2> <div class="tabber" id="mytabber"> {if $active_modules.Recommended_Products ne ""} <div class="tabbertab tabbertabdefault"> <h2>{$lng.module_name_Recommended_Products}</h2> {include file="modules/Recommended_Products/recommends.tpl" }</div> {/if} {if $active_modules.Customer_Reviews ne ""} <div class="tabbertab tabbertabdefault"> <h2>{$lng.lbl_customer_reviews}</h2> {include file="modules/Customer_Reviews/vote_reviews.tpl" }</div> {/if} <div class="tabbertab"> <h2>{$lng.lbl_more_tabs}</h2> <div class="tabber" id="mytabber"> {if $active_modules.Upselling_Products ne ""} <div class="tabbertab"> <h2>{$lng.lbl_related_products}</h2> {include file="modules/Upselling_Products/related_products.tpl" }{include file="customer/pricematch.tpl"}</div> {/if}</div></div></div> </div> <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> {/if} {if $active_modules.Product_Options ne '' && $product_options ne '' && ($product.product_type ne "C" || !$active_modules.Product_Configurator)} <script type="text/javascript" language="JavaScript 1.2"> <!-- check_options(); --> </script> {/if} ==================================================

Thanks for this MOD. Greats! 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
  #22  
Old 01-23-2008, 03:52 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

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.
__________________
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
  #23  
Old 01-23-2008, 04:32 PM
 
sales@webosusa.com sales@webosusa.com is offline
 

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

Default Re: Recently Viewed Mod

Try without the " " symbol.

Code:
else {document.write({$lng.lbl_my_text})
or like this
Code:
else {document.write($lng.lbl_my_text)

I cannot try anymore because always show my latest viewed and i had the idea after.

How can i "kill" the last views? so i can tast this?

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
  #24  
Old 01-23-2008, 05:57 PM
 
sales@webosusa.com sales@webosusa.com is offline
 

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

Default Re: Recently Viewed Mod

Question? On Internet Explorer 7 over does not show the Recently Viewed Products

Any ideas?


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
  #25  
Old 01-23-2008, 10:06 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

Quote:
Originally Posted by sales@webosusa.com
Try without the " " symbol.

Code:
else {document.write({$lng.lbl_my_text})
or like this
Code:
else {document.write($lng.lbl_my_text)


Thanks, did try that but both don't work, probably while it is in a javascript piece of code?
__________________
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
  #26  
Old 01-23-2008, 10:14 PM
 
MoonDog MoonDog is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 93
 

Default Re: Recently Viewed Mod

Warwick & sales@webosusa.com

Quote:
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.
Try this:

Place the following code in your skin1/customer/home.tpl file between the <head> and </head> tags:
Code:
<script type="text/javascript"> var myText="{$lng.lbl_my_text}"; </script>
Of course instead of {$lng.lbl_my_text}, you need to create your own language variable in the admin side.


Then open skin1/customer/main/recently_viewed.tpl and edit the following line:

From this...
Code:
else {document.write("You have no recently viewed items.")
To this:
Code:
else {document.write(myText)

- MoonDog -
__________________
X-CART Gold v4.1.8
Reply With Quote
  #27  
Old 01-23-2008, 10:45 PM
 
MoonDog MoonDog is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 93
 

Default Re: Recently Viewed Mod

For those of you who are unable to see your recently viewed items, make sure that you have enabled your cookie settings in your browser.

In Firefox it's located in the top menu bar Tools>Options...>Privacy tab and just enable 'Accept cookies from sites' and then select one of the three selections in the dropdown box.

In Internet Explorer it's at the top menu bar Tools>Internet Options...>Privacy tab and then just adjust the slider to medium.

--------------------------------------------------

For those who want to clear their recently viewed items, just delete the cookies from your browser.

In Internet Explorer go to the top menu bar Tools>Internet Options> and click on the 'Delete Cookies' button. You might have to close your browser and re-open it.

In Firefox go to the top menu bar Tools>Options>Privacy tab and then select from the downdown box by 'Keep until:' to 'I close Firefox'. Then close your browser and re-open it.

Hope this helps.

- MoonDog -
__________________
X-CART Gold v4.1.8
Reply With Quote
  #28  
Old 01-23-2008, 10:48 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

Thanks MoonDog, it isn't working yet but I'm getting there I feel.

Now it literally shows:
{$lng.lbl_my_text}

I tried removing the " around them but no good.

p.s. I have my cookies enabled but no recent products appear
__________________
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
  #29  
Old 01-24-2008, 06:53 PM
 
MoonDog MoonDog is offline
 

Advanced Member
  
Join Date: Aug 2007
Posts: 93
 

Default Re: Recently Viewed Mod

Warwick,
Quote:
Now it literally shows:
{$lng.lbl_my_text}
The most likely cause for this problem is that you have the javascript code enclosed in {literal} and {/literal} tags. Make sure that you are not enclosing it with these tags.

The same goes for the javascript code in the product.tpl file. Don't use the literal tags for the javascript code you placed there. You will not receive any javascript errors by not using them.

You will need the {literal} and {/literal} tags for the other javascript code as was posted in post #1.

Good luck.

- MoonDog -
__________________
X-CART Gold v4.1.8
Reply With Quote
  #30  
Old 01-24-2008, 10:54 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

That did it, thanks!

Now only if it would show recently viewed products, javascript is enabled, have to investigate some more
__________________
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
Reply
   X-Cart forums > X-Cart 4 > Changing and adding new features


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 02:42 PM.

   

 
X-Cart forums © 2001-2018