Jump to content

Detecting vistor's language so the currency automatically


Recommended Posts

Hi

I want my PrestaShop 1.5.4 site to detect the visitor's browser language (or visitor's country by detecting its IP) so accordingly auto select the fron site language then according currency.

 

How do I do that in admin panel? Or PrestaShop doesnt have that functionality and I have to buy that as a module too? Is there a free module to do that?

Thanx

Link to comment
Share on other sites

I'm sorry that we could not help (maybe it is because the weekend? I don't know) anyway - I reviewed all of your threads again and I've noticed that you need little and easy configuration help, believe me it's not hard to achieve all of this. So I replied in your threads - we look forward to another chance

Link to comment
Share on other sites

Hi Vekia my problem is not that, its the attitude of those people who re called fanatics, and only think about title letters. You re the only one helping me out on issues anyway, which I appreciate very much.

Thanx.

Link to comment
Share on other sites

But you may feel disappointed that you haven't got replies for your questions, you said that:

For example: I typed a simple question in General Forums 10 days ago, and still no answer, but in OpenCart there are 12 answers and 6 of them on the same day !!

 

so i reviewed your threads and replied :)

Link to comment
Share on other sites

TAGS: ARROGANCY, NO RESPONSE TO SYSTEM QUESTIONS, QUICK RESPONSE TO HOW TITLE LETTERS ARE WRITTEN, SELFISHNESS, NOT HEPLFULL AT ALL, LACK OF INFORMATION, CRAP MANUALS, SYSTEM PACKAGE KEEPS LAUNCHİNG NEW VERSIONS BUT NOT GOOD IMPROVEMENT AT ALL JUST VERSION NUMBERS ARE GETTING BIGGER, SIMPLE FUNCTIONS SHOULD BE IN THE SYSTEM BUT MONEY MONEY MONEY MINDS ASKING MONEY FOR SIMPLE MODULES etc....

Hi Ozgur34;

 

Despite your not very courteous ways, you're still finding help on this forum. I find that it's a good sign for an altruist community :)

Link to comment
Share on other sites

Hi

I want my PrestaShop 1.5.4 site to detect the visitor's browser language (or visitor's country by detecting its IP) so accordingly auto select the fron site language then according currency.

 

How do I do that in admin panel? Or PrestaShop doesn't have that functionality and I have to buy that as a module too? Is there a free module to do that?

Thanx

 

Hi, good question. The currency does change based upon the user's language that they select. However, by default it does not use the IP address to detect the location and then change the language and currency based on localization of IP Address.

Link to comment
Share on other sites

Thanx El Patron, yes I know the system already has that function but with some reason it doesnt work properly. I tried on many PCs and with different country IPs, and deleting cache each time etc. etc. but didnt work. And I realized that on forums many people looking for solution for that. So that gave me the thought that that function doesnt work, like me many people couldnt make it work.

Yes once I seen something like that on prestochangeo, I ll have a look at that now. If I find a proper free solution I ll let everyone know here. Thnx.

Link to comment
Share on other sites

Thanx El Patron, yes I know the system already has that function but with some reason it doesnt work properly. I tried on many PCs and with different country IPs, and deleting cache each time etc. etc. but didnt work. And I realized that on forums many people looking for solution for that. So that gave me the thought that that function doesnt work, like me many people couldnt make it work.

Yes once I seen something like that on prestochangeo, I ll have a look at that now. If I find a proper free solution I ll let everyone know here. Thnx.

 

geo localization doesn't work? I would suspect your testing method. If you look on my site I offer a free IP tester that allows you to simulate different countries IP address. I've done loads of testing on alot of different ps versions with out any problem.

 

suerte

Link to comment
Share on other sites

Hi El Patron bc:Benjamin

I downloaded your IP Simulator. Now how do I test this?

Example: My site has 2 currencies: Euro, Pound

B is a British visitor in UK, and G is a German visitor in Germany.

What IP on what box will I type to test Brit and then the German?

BTW I downloaded for your module GeoLiteCity.dat and also Prestashop preferences geolocation too, the same file. If they are same file why one of them is FTP'ed in Tools folder and why another one to Modules/your folder , I think we shouldnt upload the same file twice onto server.

I tested like this: I put my own IP into top box on the simulator:

IP Address you are doing test from:

and

IP Address to be simulated:

62.24.31.255

So I as a German visitor can do tests?

But no I cant do tests because web site can not be viewed, since I activated the geolocation on preferences so on Preferences>Geolocation I put my own IP into the white listed IP adress list bt still doesnt work.

 

thnx

Link to comment
Share on other sites

Hi El Patron bc:Benjamin

I downloaded your IP Simulator. Now how do I test this?

Example: My site has 2 currencies: Euro, Pound

B is a British visitor in UK, and G is a German visitor in Germany.

What IP on what box will I type to test Brit and then the German?

BTW I downloaded for your module GeoLiteCity.dat and also Prestashop preferences geolocation too, the same file. If they are same file why one of them is FTP'ed in Tools folder and why another one to Modules/your folder , I think we shouldnt upload the same file twice onto server.

I tested like this: I put my own IP into top box on the simulator:

IP Address you are doing test from:

 

and

IP Address to be simulated:

62.24.31.255

So I as a German visitor can do tests?

 

But no I cant do tests because web site can not be viewed, since I activated the geolocation on preferences so on Preferences>Geolocation I put my own IP into the white listed IP adress list bt still doesnt work.

 

thnx

 

We don't detect that the geo data is already in the localization, nor do we know how old it is etc etc etc...but thanks for the feedback...

 

when you say your site can not be viewed I can only assume you are getting the 'not available in your country' message. You may want to consider screen shots it's more clear and try to avoid 'it doesn't work' as that is not enough detail and can be the root of your problems when getting help in the fourm.

 

As for what IP to use, we give some suggestions but it's best to google for say 'country ip adresses'.

 

As for using our module, make sure before you simulate a country by ip that you clear cookies, and then clear cookies for each new simulation.

Link to comment
Share on other sites

I don't know about El Patrons module but for PrestaShop it needs to be in the tools/geoip . Once it was been decompressed into this directory, you can should then enable the GeoLocation Preference, or toggle it back to Yes.

 

and make sure to set each countries 'default currency' in the back office....else you will not see the results you expect.

 

and make sure not to run any other module that changes lang/currency you may have loaded as this can cause conflicts....

 

For the default PrestaShop geolocation feature you would need to set the Default Currency by Country. That is in Localization/Country>edit>set default Currency.

 

You also need to have the currencies correctly uploaded first!

Link to comment
Share on other sites

Thnx Benjamin

I dont know why thats happening but when I enable Preferences separator_breadcrumb.png Geolocation >

Geolocation by IP address = YES

My web site becomes not visible at all. Its just blank white page nothing else.

Other settings:

Geolocation behavior for restricted countries

: Visitors can see your catalog but cannot place orders.

Geolocation behavior for other countries: All feautures are available

are selected.

(I uploaded GeoLiteCity folder (in it GeoLiteCity.dat) into /public_html/tools/geoip

shall I upload not as folder, shall I upload as just file GeoLiteCity.dat? Do you think because of that it causes some conflict?

 

When I make Geolocation NO (not enabled) site becomes visible.

Link to comment
Share on other sites

GeoLiteCity.dat" file I downloaded was corrupted, so I downloaded a new one and it worked, I dont get that white blank screen. It ok now. I guess my mistake was this: I downloaded the same file by licking on simulator module window and also preferences geolocation page so they were downloading and one replaced other one But actually they are the same file. Or when I was uploading the same file to 2 different locations. Maybe that was the reason for corruption. Anyway I found out by changin this line to "true" define('_PS_MODE_DEV_', false); on defines.inc.php thnx to El Patron's instructions and Benjamin's helps.

 

But El Patron's simulator still gives me troubles, its so simple to use, just 2 from boxes to fill, my current IP and the country that fake visitor to be in. But when I enter ie. German IP on the second box, the site language doesnt become German and the currency I defined for Germany dont show up, it only show the default currency and default language. (I cleared cache too, my performance settings are as this: Advanced Parameters separator_breadcrumb.png Performance

Force compilation

Cache= NO

Link to comment
Share on other sites

GeoLiteCity.dat" file I downloaded was corrupted, so I downloaded a new one and it worked, I dont get that white blank screen. It ok now. I guess my mistake was this: I downloaded the same file by licking on simulator module window and also preferences geolocation page so they were downloading and one replaced other one But actually they are the same file. Or when I was uploading the same file to 2 different locations. Maybe that was the reason for corruption. Anyway I found out by changin this line to "true" define('_PS_MODE_DEV_', false); on defines.inc.php thnx to El Patron's instructions and Benjamin's helps.

 

But El Patron's simulator still gives me troubles, its so simple to use, just 2 from boxes to fill, my current IP and the country that fake visitor to be in. But when I enter ie. German IP on the second box, the site language doesnt become German and the currency I defined for Germany dont show up, it only show the default currency and default language. (I cleared cache too, my performance settings are as this: Advanced Parameters separator_breadcrumb.png Performance

Force compilation

 

Cache= NO

 

 

Hi, concerning my simulator, no need to clear cache...you need to clear your 'browser cookies' because ps stores the country there. You clear this from your browsers control panel, not by clearing the ps cache.

 

For example in chrome, find this and clear your cookies and browser cache.

 

07.15.2013-16.30.png

http://screencast.com/t/Dcr6e6hU

Link to comment
Share on other sites

Ok I downloaded http://www.presto-changeo.com/en/prestashop-free-modules/21-location-detection.html

so I semi-achieved my idea. When a visitor changes the the site language the currency shows accordingly.

But still the main idea couldnt be achieved: Location & Currency Detection has 2 options:

1-IP Address to Country Detection First

2-Browser Language Detection First

I tried both but still couldnt auto select/display the right language on the site, whatever country IP address I entered on the "eTiendas IP Simulator".

I keep cleaning the browser cache fully after each try. BTW is there a easy way to clean up smarty cache fully?

Link to comment
Share on other sites

Location & Currency Detection of presto-changeo

Installation Instructions says this, but I cant find this line on header.php. Are they talking about old versions of PrestShop's header.php?:

 

"The database table with the IP address to Country information has been installed.

* Add the following code to /header.php below "require_once(dirname(__FILE__).'/init.php');" (Line #7)

include_once(_PS_MODULE_DIR_.'/locationdetection/locationdetection.php');

$locationDetection = new LocationDetection();

$locationDetection->redirect_user(); "

Link to comment
Share on other sites

Hi

Anyone knows where this line please? =>

"require_once(dirname(__FILE__).'/init.php');"

 

its supposed to be in a header.php but I havent seen such line in header.php

is there any other header.php in PrestaShop 1.5.4 files?

Link to comment
Share on other sites

Hmm I guess that line was existed in header.php of old versions of PS thats why I couldnt find it.

Thnx Benjamin

I still couldnt find a proper location then currency detection, either by IP or visitor's browser language :)

 

Do you think I should find a solution as scripts to put between head tags on header.tpl , I mean not as PS modules but outer JavaScript solutions? (BTW if you know such solution pls let me know thnx)

Link to comment
Share on other sites

  • 2 months later...

Hi I'm looking for a similar decetion system but one that will allow a guest (not registered) to see the shipping costs for their country/shipping zone. I have 4 zones (UK,Europe,North America,Rest of the World). Each has different shipping costs. Currently the default language is UK so if someone browsing from the US goes to place an order they will be in for a nasty shock on checkout as the shipping costs displayed in the basket are not the same as on checkout!

 

I'm trying to find an addon that can handle this and am surised I can't find one?

 

Any help greatly appreciated. My shop sells novelties so would prefer to allow guests to purchase without registering.

 

Thanks
Mike

Link to comment
Share on other sites

Hi I'm looking for a similar decetion system but one that will allow a guest (not registered) to see the shipping costs for their country/shipping zone. I have 4 zones (UK,Europe,North America,Rest of the World). Each has different shipping costs. Currently the default language is UK so if someone browsing from the US goes to place an order they will be in for a nasty shock on checkout as the shipping costs displayed in the basket are not the same as on checkout!

 

I'm trying to find an addon that can handle this and am surised I can't find one?

 

Any help greatly appreciated. My shop sells novelties so would prefer to allow guests to purchase without registering.

 

Thanks

Mike

 

what version of ps?

 

note: it's not the default language but the default country that decides what is or is not shown

Link to comment
Share on other sites

thanks for the quick resonse El Patron. I'm using 1.5.4.1

 

Ultimately I want to display the correct shipping costs in the basket for a visitor on entering the site. So a US customer will see the shipping costs from the UK to the US (and not the cost of shipping locally within the UK as it currently does). So if there's an module that can do that or a work-around I'm all ears ;0)

Edited by orangeluckypierre (see edit history)
Link to comment
Share on other sites

you said "I have 4 zones (UK,Europe,North America,Rest of the World)."

 

then you should have four shops using native PrestaShop MultiStore. 

 

.uk (country code top level domain)

.com (global top level domain)

.eu (regional top level domain)

.us (check that it won't conflict with .com in seo)

 

Then you can set default country and many other things by shop.  Remember default country is what determines almost all first landings on your shop.

 

Any other approach with ps content localization is like shaving a pig, a lot of squealing for very little wool.

 

learn more here

 

https://support.google.com/webmasters/answer/1347922?hl=en

Link to comment
Share on other sites

thanks El Patron. I was thinking I'd have to duplicate the shop (and not looking forward to it) but if it's reletively simple using MultiStore that's ok.

 

Will I have to buy the 4 new domain names to use multistore or can I do it using the same domain and re-direct to each sub version of the shop from a landing/detect page?

Edited by orangeluckypierre (see edit history)
Link to comment
Share on other sites

thanks El Patron. I was thinking I'd have to duplicate the shop (and not looking forward to it) but if it's reletively simple using MultiStore that's ok.

 

Will I have to buy the 4 new domain names to use multistore or can I do it using the same domain and re-direct to each sub version of the shop from a landing/detect page?

 

buying domain names...it is very affordable. just go to godaddy

 

this can also be accomplished by subdomain names..not as nice and may foul up ssl when subdomoain to subdomain...

 

the domain names do not have to even match your original shop url...www.apple.com www.oranges.eu

 

and ps makes it a 'snap' to build these shops....then you can localize each shop...not to mention your by country/region organics are 'significantly' improved

 

anyway...wish you the best in your business.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...