Magento 2 Product Filter by Geolocation enables the display of products tailored to the customer’s location.
Customers have the flexibility to modify their location and see products that are accessible in that specific area.
This feature enhances the shopping experience by making it more personalized. It eliminates confusion by showcasing only the items that are purchasable in their region.
Within the admin panel, store owners can establish various zones for their delivery or sales areas. Products can be allocated to one or multiple zones.
The admin also has the ability to determine the distance from the customer’s location within which products should be displayed.
Additionally, there is an option to conceal items that are not available in the user’s vicinity. This ensures that the store remains organized and pertinent.
Apart from this, you can check Magento 2 Geolocation Currency Converter which allows to display converted product price as per customer location.
- Customers can easily find nearby products by entering their location.
- They can update their location at any time to ensure accurate product listings.
- This feature helps shoppers confirm product availability before making a purchase.
- Admin has control using which they can hide products that aren’t available in a customer’s specified region.
- Products can be assigned to multiple geographic areas.
- Store owners can efficiently manage various location zones.
- Admins can define a search radius to display only truly local products.
The installation is quite simple just like the standard Magento 2 extensions.
#Download Module
Firstly, you need to log in to the Webkul Store, go to My Account>My Purchased Products section, verify, and then download and extract the contents of this zip folder on the system.
#Upload Folder
Once the module zip extracts, follow path src>app and then copy the app folder into the Magento 2 root directory on the server as shown below:

#Run Commands
Next, You need to run the following commands,
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy
php bin/magento indexer:reindex
php bin/magento cache:flush
Language Translation
For translating the module language, navigate through the app/code/Webkul/ProductFilterByGeoLocation/i18n and edit the en_US.csv file.
Thereafter, rename the CSV as “en_SA.csv” and translate all right side content after the comma in the Arabic language. After editing the CSV, save it.

Now, upload it to the path app/code/Webkul/ProductFilterByGeoLocation/i18n where the installation of Magento 2 is on the server.
The Magento 2 Product Filter by Geolocation extension will be translated into the Arabic Language. It supports both RTL and LTR languages.
The user can edit the CSV like the image below.

Engage and hire Magento developers to solely concentrate on your personalized e-commerce projects for a unique experience.
How to create Google Maps API Key?
To get the API Key for the Google Maps Platform for configuring the module, you can check the steps below or click here.
To create an API key:
- Go to the Google Maps Platform > Credentials page. Go to the Credentials page
- On the Credentials page, click Create credentials > API key.
- The API key created dialog displays your newly created API key.
- Click Close.
- The new API key is listed on the Credentials page under API keys. (Remember to restrict the API key before using it in production.)
Admin Configuration of Magento 2 Product Filter by Geolocation
After the successfull installation of the extension, admin navigates to Stores > Configuration > Product Filter By GeoLocation as per the below image,

The following settings are available for the admin here,
Product Filter By Geolocation
Enable Module: Dropdown menu to Enable or Disable the module.
Google Map API Key: Field to enter the Google Map API Key.
Default Location Cover Distance: Enter the location distance to be covered in Miles here.
Settings for Unavailable Products
Display Status for Unavailable Products: To hide unavailable products, Select “No”, otherwise select “Yes”.
Display Text for Unavailable Products: Field to add a display text for unavailable products.
Admin can also navigate to this configuration from the admin dashboard sidepanel as per the below image,

Once the configuration is done, Admin moves on to Geolocation management. For this, they navigate to Product Filter by Geolocation > Manage Geolocation for Products.

Here, admin can view information like Geolocation Name, Longitude, Latitude and edit the geolocation as well.
Adding New GeoLocation
To add a new geolocation, admin taps on the Add GeoLocation button. Once they tap on it, they are redirected to the below page,

Here, admin enters the following,
- Geolocation – Enter the Geolocation.
- Geolocation name – Set a name for the Geolocation
- City/Locality – This is fetched automatically.
- Latitude – The latitude is fetched automatically.
- Longitude – The Longitude is fetched automatically.
Once done, tap on Save Geolocation button to add the geolocation to the list. The below image shows the Geolocation added successfully.

Admin can edit the Geolocation by tapping on the Edit button under the Action column. Here, we can see that no products have been mapped in the newly created geolocation.

Map Products to GeoLocation
Now, the next step is to map products to GeoLocations. For this, admin navigates to Catalog > Products. Here, they can view their product listing as per below image,

Next, admin selects the products they wish to map to a geolocation and then tap on the Actions dropdown button. Here, they’ll get the option to Add Geolocation.

Once the admin taps the Add Geolocation button, the system displays a popup that allows the admin to add the product to multiple geolocations, as shown in the image below.

Once added, the mapped products will be visible to admin under the Mapped Products section of a the particular Geolocation.

Remove Product Mapping from GeoLocation
To remove mapped products from a GeoLocation, admin simply has to deselect them and then tap on Save GeoLocation. It is described in image below where the admin has deselected the products,

Now, when the admin taps the Save Geolocation button, the system unmaps the products from this particular geolocation.

So, That’s it for the Admin End Configuration. Let’s check below the customer end now.
Customer End Product Visibility
When a customer visits the website, the system prompts them to enter their location through a popup.

In this field, the customers enter their address/location and tap on Ok button. Now, they can start browsing for their products.
Note – On location address change, cart will be emptied and customers will be redirected to homepage.
Now, if the admin does not map a product to the customer’s entered geolocation, the system marks it as unavailable or hides it completely, depending on the admin’s configuration.

Similarly, The unavailability information set by the admin will also be visible on the product page.

So that is much about the Magento 2 Product Filter by Geolocation extension.
If you have any more queries or require further assistance, please don’t hesitate to reach out to us through [email protected] or create a ticket.
Current Product Version – 4.0.0
Supported Framework Version – Magento 2.0.x, 2.1.x, 2.2.x,2.3.x, 2.4.x