Geolocation is a method for identifying where a person is located based on their IP address. Using geolocation in PrestaShop you can restrict access to your store, based on a visitor's location. You can restrict certain countries from purchasing items from your store, or even prevent visitors from certain countries from even viewing your store.

  1. Begin by logging into your PrestaShop back office.
  2. Click on the Preferences tab and then the Geolocation link under that tab.

    presta-pref-geo

  3. Just under the Geolocation heading you will see a notice to download a file and extract it to your /tools/geoip directory. To download the file (named GeoLiteCity.dat) click the "this file" link. Take note of where on your local computer the file is saved.

    presta-download-geoip-file

  4. Using the cPanel File Manager, upload the file to your PrestaShop tools/geoip directory. The full upload path will vary according to where you installed PrestaShop, but the last part of the path will be tools/geoip. Using our example, we installed PrestaShop into the shop subdomain so the directory to upload the file to is public_html/shop/tools/geoip.

    presta-upload-geo-file

  5. Once your file is uploaded, right click the file and choose Extract.

    presta-geo-file-extract

    presta-geo-file-extract2

  6. When the extraction is finished, go back into your PrestaShop back office, select Enabled under the Geolocation by IP address heading and click Save.

    presta-enable-geolocation

  7. Under Options, choose whether restricted countries can view your catalog without being able to order or not view the catalog at all.

    presta-geo-restricted-countries-behavior

  8. Also under Options, choose whether other countries can place orders (All features are available), view your site catalog but not place orders, or be blocked from viewing the site altogether as well. You will likely want to choose All features are available unless you need to restrict your site from all visitors.
  9. The last section under Options is where you choose the countries that can access your PrestaShop site. If you only have a few countries you will be selling to, you can quickly deselect all the countries by clicking the box next to Name at the top of the list twice. Then select which countries should be allowed to fully access your website and place orders from your PrestaShop store.
  10. Click the Save button under options to save any changes you made in the Options area.

    presta-geo-options-countries

  11. The last section of the Geolocation preferences is the IP address whitelist. If you have an IP address that you always want to allow access to your PrestaShop site (e.g. Google bot or another search engine IP address) you can add that IP to the list and click the Save button to update the whitelist.

    presta-geo-ip-whitelist

Anytime you want to change your Geolocation settings in PrestaShop, you can simply navigate back into this area of your PrestaShop back office and make any updates you wish to either the Options or the IP address whitelist.

Did you find this article helpful?

We value your feedback!

Why was this article not helpful? (Check all that apply)
The article is too difficult or too technical to follow.
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
How did you find this article?
Please tell us how we can improve this article:
Email Address
Name

new! - Enter your name and email address above and we will post your feedback in the comments on this page!

Did you find this article helpful?

Comments

n/a Points
2014-05-19 4:16 am

Hi

I just installed prestashop and am a newbie. I have tried to activate my Geolocation tab but unfortunately it says the file can't be located. I extracted the file to public_html/tools/geoip. However, in my back office, it says the database is unavailable.

I also don't have any location limitations so will this affect my store?

Please help

How can I fix this?

Thx 

Staff
2,342 Points
2014-05-19 4:34 pm
You stated that you do not have any location limitations yet are trying to install a geolocation plugin so I am a bit confused. Could you clarify what you meant by that?
n/a Points
2014-06-21 5:01 pm

One must be very careful when enabling native PS geo localizationi.  When the IP can not be resolved, then they visitor will either not be able to shop but see catalog or not see catalog at all.  Because the geolitecity.dat file has 85% good hit rate, this could in effect reduce sales by 15%. 

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

Please note: Your name and comment will be displayed, but we will not show your email address.

Related Questions

Here are a few questions related to this article that our customers have asked:
Ooops! It looks like there are no questions about this page.
Would you like to ask a question about this page? If so, click the button below!
Need More Help?

Help Center Search

Current Customers

Email: support@WebHostingHub.com Ticket: Submit a Support Ticket
Call: 877-595-4HUB (4482)
757-416-6627 (Intl.)
Chat: Click To Chat Now

Ask the Community

Get help with your questions from our community of like-minded hosting users and Web Hosting Hub Staff.

Not a Customer?

Get web hosting from a company that is here to help.
}