Site icon PrestaShop | Magento | CRM Modules

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