Zen Cart Logo
Forums / Currencies & Sales Taxes, VAT, GST, etc. / How to display different currency in product info?

How to display different currency in product info?

Locked

Views: 10,473

Results 1 to 16 of 16
This thread is locked. New replies are disabled.
19 Oct 2007, 8:23 PM
#1
stoned_6 avatar

stoned_6

New Zenner

Join Date:
Jul 2006
Posts:
14
Plugin Contributions:
0

How to display different currency in product info?

Hey,

is it possible to show different currencies in product info ???

base currency is EURO but I want to show my customers the product price in
USD GBP. The standart for the order should be EURO I only want to the other currencies. Is something like that possible???

Thanks

Frank

19 Oct 2007, 8:40 PM
#2
lib99 avatar

lib99

Totally Zenned

Join Date:
Dec 2004
Location:
New York, USA
Posts:
965
Plugin Contributions:
0

Re: How to display different currency in product info?

Yes it is possible, but is not a standard feature of Zen Cart. It would require custom coding. You might check the downloads section, although I'm not aware of one for this task.

19 Oct 2007, 8:49 PM
#3
stoned_6 avatar

stoned_6

New Zenner

Join Date:
Jul 2006
Posts:
14
Plugin Contributions:
0

Re: How to display different currency in product info?

Hmm.. i´m not a php coder but i think it should be possible to take the standart price recalulate them wiht the exchange rates of each currency and put the output in product_info.tpl

I have no idear how to get the exchange rates out of the database.

5 Nov 2007, 3:34 PM
#4
blackguard avatar

blackguard

New Zenner

Join Date:
Feb 2006
Posts:
38
Plugin Contributions:
0

Re: How to display different currency in product info?

I need to do the same thing. I'm looking into it right now and will post any findings here. If you come across anything, please let me know.

5 Nov 2007, 4:21 PM
#5
stoned_6 avatar

stoned_6

New Zenner

Join Date:
Jul 2006
Posts:
14
Plugin Contributions:
0

Re: How to display different currency in product info?

Hey,

If you found something I will also post it here.

It would be helpful if somebody could tell how to exchangerates from the database. The rest I could do by myself.

cheers

Frank

2 Jan 2008, 3:05 PM
#6
uvboy avatar

uvboy

New Zenner

Join Date:
Dec 2007
Posts:
6
Plugin Contributions:
0

Re: How to display different currency in product info?

I have a similar but slightly differenct dilemma that I'm hoping to get some help with. I am developing a new revision to my website that will use Zen Cart. My business sells to the USA & Canada. I obviously need to show US visitors US dollars and Canadian visitors CAD dollars. My problem is that my US & Canadian prices are different.

To elaborate: I might charge somebody in Canada $100 for a product and charge somebody in the USA $75 for the same product. It has nothing to do with exchange rates it has to do with my cost for the product being different in the two different countries. I need to know if there is a way to set a different US & Canadian price for each product where the two prices are not linked in any way (such as with an exchange rate).

Thanks.

8 Jan 2008, 5:53 AM
#7
mperacing avatar

mperacing

New Zenner

Join Date:
Jan 2008
Posts:
3
Plugin Contributions:
0

Re: How to display different currency in product info?

I have a similar question or concern.

Basically what I want to do is set 3 prices per region.
These will be:
Stockist
Dealer
Retail

These are prices that are dictated by the parket, not as a % discount of the retail price.

Each region (Australia, USA, UK, Europe) would show their currency as per what their IP address is. Anything out of these regions would divert to the AUD currency.

The other thing we need is each region will have a different bank account, so when the person set's up their account, it will take their country information and deposit the funds into the correct bank account in the correct currency.

Again, our pricing is similar to the above post where they are just prices we set that are determined by market forces. We might sell the one product in Australia at $400.00 AUD, and also sell it in the U.S. at $400.00 USD because the competition isn't as strong in that region for example.

Can anybody help us with this?....Is this facility already available or does it need a developer to help with this bit?...Thanks in advance.

9 Jan 2008, 8:05 PM
#8
stoned_6 avatar

stoned_6

New Zenner

Join Date:
Jul 2006
Posts:
14
Plugin Contributions:
0

Re: How to display different currency in product info?

It could not that big problem. I only need to know how to exchangerate and the productprice from the database. The rest I could do by myself.

Is there nobody how knows the structures of zencart?? :(

31 Mar 2008, 4:59 PM
#9
shana avatar

shana

New Zenner

Join Date:
Feb 2006
Posts:
12
Plugin Contributions:
0

Re: How to display different currency in product info?

I also am trying to display fees with different prices and currencies based on regions.

This is not a final solution but I may have found a temporary solution.
It will require that I go in once a week and update the currency exchange rates and USD totals for each product.

I made 3 regions USA, Canada, UK.
Then I made a few fees under each of those countries.

I changed the text on the Main page to be the regions and list of fees under the regions.
On the store I made visible the currency box and categories.
Then I made links from the Main page to the individual pages for each fee.

But before doing this I would change the currency on the page displaying one fee, and then insert that link onto the Main page for that fee.

So when someone comes to the store they see their region and fees they can pay.
When they click on the fees under UK they will see all the products in GBP.
When they click on the fees under USA they will see all the products in USD.

Once this was done I took off the store the currency option and categories. Then someone cannot change the currency.

I think if I could get a real time converter installed I would be satisfied with this option.
Anyway may be this can help someone else until then.

Shana

6 Apr 2008, 9:44 AM
#10
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Re: How to display different currency in product info?

Stoned-6:

Hey,

is it possible to show different currencies in product info ???

base currency is EURO but I want to show my customers the product price in
USD GBP. The standart for the order should be EURO I only want to the other currencies. Is something like that possible???

Thanks

Frank

Code for euro is here:

will place in downlaods section. Takes currency values from database, just change the query to make dollars e.t.c.

Add In /public_html/includes/templates/yourtemplate/templates/tpl_product_info_display.php

After line 72:

 //euro currency

$currencies_query_db = "select *
                          from " . TABLE_CURRENCIES . " where title = 'Euro'";
$rate = $db->Execute($currencies_query_db);
$rates = $rate->fields['value'];
$spacer = '<br/>';
echo $spacer;
$value = zen_get_products_display_price((int)$_GET['products_id']);
list($curency, $amount) = split(';', $value);
$amount = $amount*$rates;
$amount= number_format($amount, 2, '.', '');
echo '€'.$amount;

//end of euro currency
6 Apr 2008, 10:53 AM
#11
calljj avatar

calljj

Zen Follower

Join Date:
Mar 2007
Posts:
253
Plugin Contributions:
2

Re: How to display different currency in product info?

if you want to display in product listings also, then :

Add In /public_html/includes/modules/yourtemplate/product_listing.php

After line 111:

//euro currency

$currencies_query_db = "select *
                          from " . TABLE_CURRENCIES . " where title = 'Euro'";
$rate = $db->Execute($currencies_query_db);
$rates = $rate->fields['value'];
$value = zen_get_products_display_price($listing->fields['products_id']);
list($curency, $amount) = split(';', $value);
$amount = $amount*$rates;
$amount= number_format($amount, 2, '.', '');
$amount= 'Approx €'.$amount;
$lc_text = $lc_price . $amount;

//end of euro currency
6 Apr 2008, 11:17 AM
#12
stoned_6 avatar

stoned_6

New Zenner

Join Date:
Jul 2006
Posts:
14
Plugin Contributions:
0

Re: How to display different currency in product info?

Hi,

thanks a lot :clap:

So I could make now all changes to display the additional currency.

Cheers

Frank

12 Jun 2008, 2:33 AM
#13
xman888 avatar

xman888

Zen Follower

Join Date:
Jan 2007
Posts:
226
Plugin Contributions:
0

Re: How to display different currency in product info?

Hello,

I don't know if my situation is slightly different of not.

My website is marketed in New Zealand, however I am in Australia.

My products are in Australian Dollars. I can't put them in NZ dollars because the merchant account that I have only allow the system to send payments to my Eway account in Australian dollars.

What I want to do is to be able to have the ability to show (on the product page), the price in New Zealand dollars (like the currency side box, how you can select different currencies, however I don't have my site set up with side boxes)

Is there a way to do this?

Kind regards,
Anthony

10 Sep 2008, 1:26 AM
#14
time111 avatar

time111

New Zenner

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

Re: How to display different currency in product info?

Calljj:

if you want to display in product listings also, then :

Add In /public_html/includes/modules/yourtemplate/product_listing.php

After line 111:

//euro currency

$currencies_query_db = "select *
from " . TABLE_CURRENCIES . " where title = 'Euro'";
$rate = $db->Execute($currencies_query_db);
$rates = $rate->fields['value'];
$value = zen_get_products_display_price($listing->fields['products_id']);
list($curency, $amount) = split(';', $value);
$amount = $amount*$rates;
$amount= number_format($amount, 2, '.', '');
$amount= 'Approx €'.$amount;
$lc_text = $lc_price . $amount;

//end of euro currency


Hi Calljj,

Im totally newbie, just installed ZenCart 3 days back and spent almost 48 hrs on it.

Really nice code.

I have little problem and need your guidance.

When I tried to replicate same code in other files like new_products.php, It is working but the problem is that its not reflecting Discount price.

I mean to say when its calculating the given currency by your code, its calculating the original product price for currency conversion, its not taking the new discounted price.

1st Request
So I want to know what changes should I do to the code, so it should see if the price is discounted then display that, **if possible **in same way as it shows like Strike out old price and show new price in red color.

2nd Request
I want your code to reflect on all site, so individually what all files I should put this code. When I changed new_products.php, its changed in new products section but still not on home page.... So where to see to change home page too.

3rd Request
Is it possible it to integrate to show at products total value page in shopping cart, if so then how.

My base currency is Euro, and im placing your code with GBP

Thank you in advance.

~Time
22 Jul 2009, 1:07 PM
#16
gociak avatar

gociak

New Zenner

Join Date:
Jul 2009
Posts:
12
Plugin Contributions:
0

Re: How to display different currency in product info?

Its possible to display different currency in attributes???
please help