close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Displaying different currencies for different countries - best approach?

Thread begun 2/20/2017 9:27 am by Nathon Jones Web Design | Last modified 2/21/2017 4:35 pm by Ray Borduin | 3327 views | 11 replies |

Nathon Jones Web Design

Displaying different currencies for different countries - best approach?

Our site is based in the UK but we'd like to display dollar prices to US visitors and Euro prices to European union visitors. How easy is this to do, or, what is the best approach to this?

Thank you.
NJ

EDIT: So I need to get the visitors country from their IP and then display the corresponding currency. Is this something within eCart or will I have to hand code this? I see references to MaxMind and Neustar but the documentation is beyond me and I'm not clear if there's a cost involved.

Would appreciate your advice, thank you.

Sign in to reply to this post

Ray BorduinWebAssist

Are you using an exchange rate or did you add separate fields to your products table for each supported country? Most people that do this have a country dropdown on the home page that allows them to set their country and it saves a cookie. Trying to set the cookie by default based on the IP is an additional feature, but not necessary or 100% accurate since people can be using a proxy or browsing on vacation etc.

Sign in to reply to this post
Did this help? Tips are appreciated...

Nathon Jones Web Design

Looking for advice on the best approach to be honest. I found this article very helpful:
https://www.cleverbridge.com/corporate/display-international-pricing-the-right-way/

They make the point, regarding country dropdown, that there's nothing preventing the customer selecting any country they like, regardless of where they are, so what is the point of that really? I'd say that would certainly be as accurate, if not less so in fact, than detecting the location from IP.

They go on to recommend either MaxMind (https://www.maxmind.com/en/home) or Neustar (https://www.neustar.biz/risk/compliance-solutions/ip-intelligence) but I note that they are both paid solutions. I note, also, that there are free option such as www.ip2country.net.

What I'm not clear on is, once you've detected the IP and it has interpreted the Country, how you then integrate that with eCart so that the correct currency is displayed to the customer but, at the same time, it's the original currency that's processed.

Would appreciate any advice/guidance you could offer.
Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

You will have to hand code or license something that would figure out the country based on the IP address.

Sign in to reply to this post
Did this help? Tips are appreciated...

Nathon Jones Web Design

Do you have any experience of that Ray?

I was reading about PHP GeoIP but that it has been superseded by GeoIP2 API (https://github.com/maxmind/GeoIP2-php). Is there a solution within that? Considering we only need the country?

Sign in to reply to this post

Ray BorduinWebAssist

Although a drop-down would give users the choice to choose the "wrong" country. I'm not sure what the issue is with that. If your IP checker returns one of the 200 countries that you don't have a currency set for, how would you determine the currency for them? If someone is traveling or using a proxy server or behind a firewall that blocks the IP the drop-down lets them choose the currency they want to shop in.

That is all irrelevant though if your client wants automatic detection.

Once you have determined the country of origin you would save it in the session and then you can use IF statements to show the correct values where you need to including in the cart code.

Sign in to reply to this post
Did this help? Tips are appreciated...

Nathon Jones Web Design

Could you not do...
if <is one of the countries we have a currency for> then <this> else <this>

...with the else being a default ($, £ €) if the country is not detected?

MaxMind allow you to download their GeoIP2 Country database which can be queried. There is a fee for that but I see they offer a free "lite" version at http://dev.maxmind.com/geoip/geoip2/geolite2/ in order get set up and test. They offer open source API packages for connecting to the database which I might be able to work out.

I will put the country drop-down to the client as that, to me, sounds like something I could at least attempt myself <cue sound of tearing hair out and being back on here within a few hours!> but if they insist on IP querying, is this something you could help me with?

Thank you.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

Yes. I could help you integrate one of those databases or api's if your client decides they need that.

Different countries generally use different domains.

This is another way many people do this. If you go to http://www.yourdomain.com you may get $ but if you go to http://www.yourdomain.co.uk you could get £ and you could secure domains for other supported countries you want as well.

Then you can get the correct currency based on the domain itself just like a session variable.

Sign in to reply to this post
Did this help? Tips are appreciated...

Nathon Jones Web Design

Does that mean multiple sites? So if a page change occurs it would have to be uploaded to every domain version of the site? :S

To get the currency though, you're just detecting the domain and then storing a country value in session based on that? Couldn't someone from the UK, for example, just visit the .com?

With the country drop down, we'd simply provide a list of countries in a select menu, store the selection in session and display the currency based on session, right? What happens if they don't select a country? Are we talking about forcing the user to do that?

Ball park figure for implementing the database/api option?

Also, all of this would still need some kind of exchange rate integration too though wouldn't it?

Thank you Ray. Appreciate this.
NJ

Sign in to reply to this post

Ray BorduinWebAssist

You would have all of the domains point to the same IP address... so there would be only one version of the pages.

Of course someone could go to the other version of the site if they wanted to, but I don't see why that is a problem.

You would default to the main country and then allow them to change it.

You would need to probably find another service to do the exchange rate as well if you didn't have separate fields for price in each currency in the products table that you maintain manually.

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...