PrestaShop Documentation, PrestaShop Tutorials

PrestaShop Geolocation Features

PrestaShop includes Geolocation features that let you detect a visitor’s location based on their IP address and adapt your shop’s behavior accordingly. This is mainly useful for regional restrictions, pricing, tax rules, and compliance. Here’s a breakdown of the geolocation features:


🔑 Core Geolocation Features in PrestaShop

  1. Restrict Access by Country
    • You can block access to visitors from specific countries.
    • Useful for compliance (e.g., selling alcohol, regulated products, or legal restrictions).
  2. Redirect Customers Based on Location
    • Detects the country of the customer’s IP address.
    • You can redirect them to the correct store version (if you run a multi-store with multiple languages or currencies).
  3. Automatic Tax & Currency Settings
    • Applies the correct tax rules (VAT, GST, sales tax) depending on customer’s country.
    • Can auto-display the local currency when available.
  4. GeoIP Database Integration
    • Uses the MaxMind GeoLite2 database (must be installed manually since PrestaShop 1.7+ due to licensing changes).
    • Ensures accurate country detection.
  5. Granular Control for Products/Orders
    • You can prevent orders from regions where you don’t ship.
    • Helps avoid unwanted shipping or payment gateway mismatches.
  6. Fallback Options
    • If a visitor’s IP cannot be geolocated, PrestaShop allows you to define a default country/currency.

⚙️ How to Enable Geolocation in PrestaShop

  1. Go to Back Office → Shop Parameters → Traffic & SEO → Geolocation.
  2. Enable Geolocation by IP address.
  3. Upload the MaxMind GeoLite2 database file (GeoLite2-Country.mmdb) into the /app/Resources/geoip/ directory.
  4. Configure:
    • Countries allowed/blocked
    • Behavior for restricted IPs (show message, deny access, or redirect)
    • Default country if location cannot be detected

📌 Practical Use Cases

  • EU VAT compliance: Charge the right VAT based on the customer’s country.
  • Multi-store setup: Redirect Indian visitors to your .in domain, US visitors to .com.
  • Restricted goods: Block visitors from countries where shipping is not allowed.
  • Fraud prevention: Compare the customer billing country with the detected IP country.

 

About zohaibk

We develop useful addons for #E-Commerce and #CRM software to provide extra features.#PrestaShop,#Magento,#SugarCRM,#Vtiger & #Android #apps
View all posts by zohaibk →