Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Auto Detect Country


Guest

Recommended Posts

Does anyone know if there is a contribution that will detect the visitor's country and will then automatically display prices in that country's currency?

 

Looking to simplify here... fewer clicks to get to the purchase...

 

Thanks in advance!

 

~Roq

Link to comment
Share on other sites

Try searching for default country in contributions.

 

The code there would be a good place to start.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Ya, thats what I thought too. Combed through everything that I could think of that might even get me close to the info that I want but so far am totally empty handed.

 

Anyone else know of a contribution that will show prices based on the visitors country?

Link to comment
Share on other sites

Sorry, my first suggestion didn't get you any further forward.

 

I can't see a db table that links country to currency.

 

Country to address format - yes (funny how the default is all set to 1).

 

Looks like a contribution.

 

Sql to add extra field to country and populate it.

 

Admin funtion to allow it to be maintained.

 

Admin funtion to allow it to be maintained.

 

Sql to add default currency in admin area if country not found or none set.

 

Auto switch currency when someone logs on depending on invoice address country.

 

The order table has currency on it so don't belive any moe mod ould be required.

Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile

 

Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.

 

For links mentioned in old answers that are no longer here follow this link Useful Threads.

 

If this post was useful, click the Like This button over there ======>>>>>.

Link to comment
Share on other sites

Does anyone know if there is a contribution that will detect the visitor's country and will then automatically display prices in that country's currency?

 

Looking to simplify here... fewer clicks to get to the purchase...

 

Thanks in advance!

 

~Roq

THe code already detects the visitors language, as set on the visitors computer. This is not the same as determining the country but may be an close approximation. There is also a php variable named $_SERVER["HTTP_ACCEPT_LANGUAGE"] that may do it to, though I'm not sure of the accuracy. Other than that, you would have have to look up the IP, which would most likely slow the site down considerably.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

  • 2 weeks later...
if you cant find how to gelocate the user, then i can write the code around it.

 

perhaps we can use this:

http://phpclasses.dev.skypp.com/browse/package/3813.html

 

which is based on

http://www.hostip.info/ webservice

 

my idea is:

if the user has manually selected the currency,

> we should store it to a SESSION variable and use it always

if the user hasnt manually choose any currency (yet)

> we change currency according to geolocation anytime the language is changed (manually or browser_location)

this currency is valid only until the user changes currency manually once.

 

 

i will be able to work on it only next week, see if you can be faster.

jac

Expresionario.com | Pura Sub-cultura!

Link to comment
Share on other sites

  • 2 years later...

Does anyone know if there is a contribution that will detect the visitor's country and will then automatically display prices in that country's currency?

 

Looking to simplify here... fewer clicks to get to the purchase...

 

Thanks in advance!

 

~Roq

 

Has anyone been able to locate or create a contribution for this?

 

Thanks,

Sophie

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...