Site icon PrestaShop | General Knowledge

Prestashop how to enable geolocation and use it

Alright, letโ€™s turn PrestaShop Geolocation from โ€œmystery toggleโ€ into something actually useful ๐ŸŒ๐Ÿ˜‰
Iโ€™ll walk you through enable โ†’ configure โ†’ real-world use cases.


โœ… What is Geolocation in PrestaShop?

Geolocation detects a visitorโ€™s country (and sometimes region) using their IP address.

You can use it to:


๐Ÿ”น Step 1: Enable Geolocation

Back Office Path

International โ†’ Localization โ†’ Geolocation

Settings

  1. Geolocation by IP address โ†’ โœ… Yes
  2. Geolocation behavior for restricted countries
    Choose one:
    • โŒ Visitors cannot see your catalog
    • โš ๏ธ Visitors can see catalog but cannot order
  3. Whitelist IP addresses
    ๐Ÿ‘‰ Add your own IP (important for testing)
    https://whatismyipaddress.com
    
  4. Click Save

๐Ÿ”น Step 2: Download & Activate GeoLite Database

PrestaShop uses MaxMind GeoLite2.

Do this:

  1. Click Download the geolocation database
    (button is on the same page)

OR manually upload:

/app/Resources/geoip/
or
/tools/geoip/

Required file:

GeoLite2-Country.mmdb

๐Ÿ’ก Without this file, geolocation will NOT work.


๐Ÿ”น Step 3: Enable Country Restrictions

Go to:
International โ†’ Locations โ†’ Countries

For each country:

Example:


๐Ÿ”น Step 4: Enable Required Modules

Check these modules are enabled:

Path:
Modules โ†’ Module Manager


๐Ÿ”น Step 5: Real-World Uses (Most Important Part)

๐Ÿงญ 1. Restrict Orders by Country

๐Ÿ‘‰ Common for B2B stores


๐Ÿ’ฐ 2. Automatic Tax Calculation

Enable:
International โ†’ Taxes

โœ”๏ธ Works well for VAT / GST logic


๐ŸŒ 3. Currency & Language Auto-Selection

PrestaShop can:

Path:
International โ†’ Localization


๐Ÿšš 4. Shipping Rules by Country

Path:
Shipping โ†’ Carriers


๐Ÿ” 5. Redirect Users (Advanced)

Example:

Needs:

(Ask me if you want ready code for this ๐Ÿ‘Œ)


๐Ÿ”น Step 6: Testing Geolocation

Best ways:

  1. Use VPN (India / US / EU)
  2. Use proxy IP
  3. Temporarily disable your country

โš ๏ธ Remember:


โš ๏ธ Important Notes


โœ… Quick Checklist

โœ” Geolocation enabled
โœ” GeoLite database installed
โœ” Countries configured
โœ” Cache cleared
โœ” Modules enabled


ย 

Exit mobile version