A little advice with GeoLocating a website

Looking for some advice here, really not terribly Wappler related, just want you knowledge.

My client wants me to turn on Geolocation for their website, so on a standard page it should not make much difference as they are not trying to alter language or anything. On some pages though there are prices, so here is my question how do I convert a price from a base price set in UK Pound Sterling to US Dollars or Yen or whatever based upon what country the user is visiting from, and because exchange rate fluctuates constantly, how do i make my site get the rates from somewhere that tracks that.
Honestly do not quite know where to begin with this one.

I don’t know if this will help or not, but I had used this about five years ago. It helped me do what you’re trying to do.

https://www.geoplugin.com/

1 Like

the simple option is cloudflare i use it all the time.
getting the geoloaction will not help much

Guess i have to agree with @mrbdrm, by far the easiest way would be to use a merchant who can handle that all for you otherwise it is not going to be an easy fix (unless you fancy designing a plugin for us all . )-:slight_smile:

If you really want to try there are APIs at Google, https://currencylayer.com and https://fixer.io/ for live currency conversion which may help but i have to be honest, never tried them myself but lots of detail on stackexchange and github.

One thing to bear in mind with some of these services is that they can suddenly stop working - at least the free ones.

I used Yahoo Finance in some software I developed (not a website) to get currency rates - it worked fine for several years and then stopped one day without any warning. I initially thought it was a temporary connection issue but in fact they had decided to withdraw the service.

I then switched to fixer.io. Again, this worked fine for a while and then suddenly stopped. It was a free service when I started using it and they then introduced restrictions on certain features, unless you purchased a subscription. I contacted fixer and pointed out it was rather inconvenient for me (and for my customers) to change the terms without any warning. They were very helpful and immediately switched me to a ‘legacy’ account which worked as before. Based on this experience at least, I would recommend them.

Not a Stripe user (yet) but do I assume correctly that when Wappler has Stripe integration implemented then that service will suffice for your needs? I seem to recall it is on the Wappler team to do list, maybe we can get some time scales?

Sorry been out most of today, thank you to everyone who has answered this. I will have a look through all the ideas and see if i can possibly figure out a decent way to do what I need.
Unfortunately this particular job is a holiday providers website that does not actually process payments online, they just have a from price on all their holidays, so I need to achieve a few things with this.

  1. Each holiday page has a detailed drawn map that assumes the person who want their holiday is from the UK, so for a person from the UK I want that map to remain, however from any other country I want to display a very generic map rather.
  2. These pages all have a from price that has flights included and the airport is assumed to be UK, again for clients viewing the site from the UK I would like that to remain, For any other countries I want to remove the flight portion of the price and then convert the answer into their currency.
  3. I need to change wording ever so slightly for non UK people only.

In the end of the day I need a UK version and a generic version of quite a few elements, and once all that is working I need to do a currency conversion. Maybe this is going to be slightly more difficult than I had imagined.