Forums / All Other Contributions/Addons / Dual Currency Display Mod

Dual Currency Display Mod

Results 1 to 20 of 28
06 Mar 2007, 20:27
#1
mattc avatar

mattc

New Zenner

Join Date:
Jan 2005
Posts:
24
Plugin Contributions:
0

Dual Currency Display Mod

A few people have asked how to display a second currency on the product page. Here is a little mod that we use.
Hope it helps,
Matt
07 Mar 2007, 08:01
#2
kansai_mike avatar

kansai_mike

New Zenner

Join Date:
Dec 2006
Posts:
48
Plugin Contributions:
0

Re: Dual Currency Display Mod

This works beautifully on my 1.3.6 cart. See it here for Japanese Yen and US Dollars http://tinyurl.com/34lg7l
07 Mar 2007, 08:33
#3
kansai_mike avatar

kansai_mike

New Zenner

Join Date:
Dec 2006
Posts:
48
Plugin Contributions:
0

Re: Dual Currency Display Mod

Matt,

It displays the prices throughout the catalog very well. I would like the cart to display in two currencies also (shipping, subtotals and totals...sidebox cart also). I don't know how or where to edit the code. Any ideas? Thanks again.

BTW. My default currency is set to JPY.
07 Mar 2007, 15:36
#4
mattc avatar

mattc

New Zenner

Join Date:
Jan 2005
Posts:
24
Plugin Contributions:
0

Re: Dual Currency Display Mod

Mike,

Yes it can be done, but it requires hacking the core code.

In includes/modules/pages/shopping_cart/header_php.php find:
$cartShowTotal = $currencies->format($_SESSION['cart']->show_total());


then beneath it put:
$original_currency = $_SESSION['currency'];
$_SESSION['currency'] = EXTRA_CURRENCY;
$cartShowTotalExtraCurrency = $currencies->format($_SESSION['cart']->show_total());
$_SESSION['currency'] = $original_currency;


Now drop $cartShowTotalExtraCurrency anywhere you like into your cart template to display the subtotal in your second currency.

You can repeat this process for other values as needed.
07 Mar 2007, 15:39
#5
mattc avatar

mattc

New Zenner

Join Date:
Jan 2005
Posts:
24
Plugin Contributions:
0

Re: Dual Currency Display Mod

Oh, by the way, your site looks great, but being from the UK I thought when I saw your shopping cart that the prices were in pounds sterling! You may wish to emphasise the Yen.
08 Mar 2007, 06:33
#6
kansai_mike avatar

kansai_mike

New Zenner

Join Date:
Dec 2006
Posts:
48
Plugin Contributions:
0

Re: Dual Currency Display Mod

Hi Matt,

Thanks for the reply. nice comment and the heads up. I'll check out the code. If you don't mind, did the prices come up Pounds Sterling on top and Yen on the bottom? It should be coming up USD on top and Yen on the bottom.
08 Mar 2007, 06:54
#7
mattc avatar

mattc

New Zenner

Join Date:
Jan 2005
Posts:
24
Plugin Contributions:
0

Re: Dual Currency Display Mod

The catalog looks fine. Its just that in the shopping cart you do not display "JPY" with the prices, so the £ symbol looks like it might be uk sterling.
08 Mar 2007, 07:03
#8
kansai_mike avatar

kansai_mike

New Zenner

Join Date:
Dec 2006
Posts:
48
Plugin Contributions:
0

Re: Dual Currency Display Mod

Gotcha. No. That's the problem I'm asking about. The catalog works but I want to make the changes to the cart so it will display both currencies. That's what I'm hoping your hack will help me with. Still haven't had a chance to look at it yet though.

It's actually a Yen symbol. I'll be adding JPY and USD like I have in the catalog once I get it working. Cheers.
08 Mar 2007, 10:01
#9
ronwong avatar

ronwong

Zen Follower

Join Date:
Jan 2006
Posts:
223
Plugin Contributions:
0

Re: Dual Currency Display Mod

I thought to avoid confusion, it would be great if the base currency be bold or larger font , or the secondary currency be in italics or different colour. (Like ebay). Yes, looking at your site, customer may confuse which is the currency.
09 Mar 2007, 05:44
#10
kansai_mike avatar

kansai_mike

New Zenner

Join Date:
Dec 2006
Posts:
48
Plugin Contributions:
0

Re: Dual Currency Display Mod

Thanks Ron. I made some changes to the currency design per yours and Matt's suggestion. I think it looks better. I can understand how it may have been confusing. I hope this works out better.
10 Mar 2007, 23:05
#11
intelcos avatar

intelcos

Totally Zenned

Join Date:
Apr 2004
Posts:
584
Plugin Contributions:
0

Re: Dual Currency Display Mod

Can this also work if more then two currencies are used, we have 3 (CAD USD EURO)
11 Mar 2007, 12:12
#12
kansai_mike avatar

kansai_mike

New Zenner

Join Date:
Dec 2006
Posts:
48
Plugin Contributions:
0

Re: Dual Currency Display Mod

I don't see why not. Maybe add extra currency3 to the function. My only thought would be that it would add more text to the page thus decreasing your keyword density. You'd have alot of EUROs which I think is a pretty popular keyword.
16 Apr 2007, 11:12
#13
geo64 avatar

geo64

New Zenner

Join Date:
Apr 2007
Posts:
2
Plugin Contributions:
0

Re: Dual Currency Display Mod

Kansai_mike:

This works beautifully on my 1.3.6 cart. See it here for Japanese Yen and US Dollars http://tinyurl.com/34lg7l

Cheers for the work done on this great mod.

Mike, I notice that you also have dual pricing on your product listing pages. Can you please pont me in the right direction to set this up? I can only get dual pricing on my product info page (tpl_product_info_display.php).

Many thanks,

Geo
18 Apr 2007, 12:04
#14
geo64 avatar

geo64

New Zenner

Join Date:
Apr 2007
Posts:
2
Plugin Contributions:
0

Re: Dual Currency Display Mod

I found the answer to my Q in the previous post:

In the product_lisitng.php find this code:

 $lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />';


Replace with this:

$lc_price = zen_get_products_display_price($listing->fields['products_id']) . '<br />' . zen_get_products_display_price_extra_currency($listing->fields['products_id']);
30 Sep 2008, 08:55
#15
time111 avatar

time111

New Zenner

Join Date:
Sep 2008
Posts:
95
Plugin Contributions:
0

Re: Dual Currency Display Mod

Hi,

I tried to install this mod on 1.3.8a but didnt worked, anybody have any idea what needed to be modify

Time
01 Oct 2008, 13:00
#16
kansai_mike avatar

kansai_mike

New Zenner

Join Date:
Dec 2006
Posts:
48
Plugin Contributions:
0

Re: Dual Currency Display Mod

Sorry. It's been too long for me to remember.
03 Nov 2008, 05:41
#17
tj1 avatar

tj1

Totally Zenned

Join Date:
Mar 2005
Posts:
628
Plugin Contributions:
0

Re: Dual Currency Display Mod

Hi, can someone confirm whether this works on 1.3.8 ?

Thanks
20 Nov 2008, 11:58
#18
time111 avatar

time111

New Zenner

Join Date:
Sep 2008
Posts:
95
Plugin Contributions:
0

Re: Dual Currency Display Mod

tj1:

Hi, can someone confirm whether this works on 1.3.8 ?

Thanks


just install a dummy site, in any test folder for zen cart, there you can test all mods, without effecting live site or waiting for some to answer does it work or not on any particular version.

~Time
02 Mar 2009, 09:41
#19
noobuser avatar

noobuser

New Zenner

Join Date:
Feb 2009
Posts:
43
Plugin Contributions:
0

Re: Dual Currency Display Mod

Hi,
I am from UK. I have used the supplied code for the dual currency and works perfectly fine.

Currently I have configured as USD as my default currency.

After using the code it is also showing me Euro too.

What if I want to display 3-4 currencies. like

USD
Euro
AUS - Australia
CAN - Canada
INR - india

I can see all these currencies in Localization->Currencies and I update this too. By the way is there a way update the currecy listing by "cron"?

Much appreciate your help

Harry
18 May 2009, 14:30
#20
jabe00 avatar

jabe00

New Zenner

Join Date:
Feb 2009
Posts:
32
Plugin Contributions:
0

Re: Dual Currency Display Mod

MattC:

Mike,

Yes it can be done, but it requires hacking the core code.

In includes/modules/pages/shopping_cart/header_php.php find:
$cartShowTotal = $currencies->format($_SESSION['cart']->show_total());


then beneath it put:
$original_currency = $_SESSION['currency'];
$_SESSION['currency'] = EXTRA_CURRENCY;
$cartShowTotalExtraCurrency = $currencies->format($_SESSION['cart']->show_total());
$_SESSION['currency'] = $original_currency;


Now drop $cartShowTotalExtraCurrency anywhere you like into your cart template to display the subtotal in your second currency.

You can repeat this process for other values as needed.



Hellos..

I do it from total in all pages and it's great, but i want add in prices uniques, Price Total...

For example, Shopping Cart Price on Price Unit, Price Total..

I add on Sub-Total: RD $500 / US $14.28 and looks great..

I want this format in any place with Price RD $500 / US $14.28 ..

Regards..
Jose Bourdier