7 replies [Last post]
half_brick's picture
Offline
Joined: 02/04/2008
Juice: 82
Was this information Helpful?

We have a client that wants a multilingual site with transactions in multiple currencies. Specifically, the customer should be charged in their native currency, so that they are billed the expected amount.
Here's how I'm currently thinking about it:

1. Let ubercart handle everything in USD (not that we're in the US, but most of his customers are, and besides only the US matter aye Smiling )
2. Handle presentation of prices (also discounts, line items etc) in whatever currency the customer has selected (or has been selected for them) via the uc_format_currency function. That seems the most central place to do the conversion.
3. At the point of payment, ensure that the converted amount is handed to the gateway. I haven't gone too deep into this, but I hope that doing the conversion around uc_payment_balance should work.

I'd appreciate comments on whether this approach will work, and whether you guys think those two points of conversion (uc_format_currency and uc_payment_balance) will work.

I realise there's been a bit of discussion about this stuff before:
http://www.ubercart.org/forum/support/4758/ubercart_multilingual_site_mu...
http://www.ubercart.org/forum/support/819/multiple_currencies_products
but nothing tangible seems to have come out of it.

If it looks like the approach I've outlined is going to work out, I'm gonna start on a contrib module for it. Else I'd be keen to hear of the best way to tackle this problem.

72dpi's picture
Offline
Joined: 10/07/2007
Juice: 134
heya, Just to put in my 2

heya,

Just to put in my 2 cents worth, I wouldn't do this, as it would cause so many hassles.

Multiple currencies, languages etc would be hard enough, then you have to make sure your bank/paypal etc is setup for currencies, waay too difficult.

Why not have standard USD, then have a currency converter link, that way, you get exact amounts etc, as defined by stock exchanges.

As an example, On the product page, you could simply run somethign like:

  <!-- Start Currency Converter link -->
<script type="text/javascript" language="javascript">
<!--
function PopXe()
{
CurrencyWindow = window.open ('', 'CurrencyWindow', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=1,height=190,width=650');
CurrencyWindow.focus();
CurrencyWindow.location.href = 'http://www.xe.com/pca/input.cgi?From=AUD';
}
-->
</script>
<a href="javascript:PopXe()" class="mainlevel" title="Check currency conversion/exchange rate online"><img src="images/stories/icons/icon_money.gif" alt="." style="vertical-align: middle; margin-bottom: 0.25em;" border="0"> Exchange rate</a><br>
<!-- End Currency Converter link -->

Where it has From=AUD you could do a simple php query to give the country location.

For more info on this converter, check out: http://www.xe.com/ucc/customize.php

or, perhaps consider adding a google widget to your page:
http://gmodules.com/ig/creator?synd=open&url=http%3A//www.donalobrien.ne...

These are just quick suggestions, but if this is the dirrenece between using Ubercart or not, i'd use Ubercart with this mnethod, rather than wait.

best wishes with your project...

TR
TR's picture
Online
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3424
Re: heya, Just to put in my 2

I've already implemented multiple currencies - just need to get my client's approval then I'll post it. Maybe early next week.

<tr>.
72dpi's picture
Offline
Joined: 10/07/2007
Juice: 134
Re: Re: heya, Just to put in my 2

Aaah, well done TR,

half_brick's picture
Offline
Joined: 02/04/2008
Juice: 82
Re: Re: Re: heya, Just to put in my 2

Cool TR, Is it implemented in the way I described it?
Any chance you could upload your module now? I'd just like to scope out whether it looks like it'll work for us (I don't mind if it's not pretty Smiling )

In regards to what 72dpi was saying, I know what you mean in it being a hassle, but if I can pull it off in the way decribed then it would be a nicer customer experience for all supported currencies, as they would only ever see that currency, and they would be charged the exact same amount in their own currency. Even if I provide a handy and up-to-date currency conversion, and charge in the converted USD there are going to be differences in what the customer sees and what they are charged (due to the infrequency with which financial organisations release currency rates).

One weakness in my approach that I've just thought of is order history. If everything is stored in USD, and presented in the native currency, then when someone looks back on their order the rate and therefore that amount will have changed...
Confusing.

All up, I'd rather do it the way you outline, but requirements is requirements Smiling

TR
TR's picture
Online
Bug FinderFAQ ModeratorGetting busy with the Ubercode.
Joined: 11/05/2007
Juice: 3424
half_brick wrote:Cool TR, Is
half_brick wrote:

Cool TR, Is it implemented in the way I described it?
Any chance you could upload your module now? I'd just like to scope out whether it looks like it'll work for us (I don't mind if it's not pretty Smiling )

Oh, it's VERY pretty. You'll like it. Yes, I approached it in a similar manner to what you describe. I'll have it up as soon as possible, and I will be actively supporting it.

<tr>.
half_brick's picture
Offline
Joined: 02/04/2008
Juice: 82
Haha, great. I look forward

Haha, great.
I look forward to testing it out.

Ryan's picture
Offline
Joined: 08/07/2007
Juice: 15438
half_brick wrote:and besides
half_brick wrote:

and besides only the US matter aye Smiling

Sorry, I don't have anything useful to add to the conversation, but that made me laugh. Laughing out loud