Store Locator Plugin Guide
Agile Store Locator has three distance control options available for users and customers:
- Slider - For those who prefer a more interactive experience. This option enables distance control from a slider which allows you to increase or decrease the radius miles from the chosen location.
- Dropdown Control - Allows distance to directly be controlled from a dropdown menu. Users can quickly move to a specific distance by choosing a number from the dropdown menu.
- Boundary Box - The Boundary Box option enables users to view a list of stores within a certain area. Therefore, only showing the store list within the confines of the selected area.
These three distance control options can be selected from the “ASL Settings” page to be implemented on the store list
1- Setting the Radius Value for the Distance Range Slider
Agile Store Locator features an option to fix your radius to any numeric value in kilometers or miles. Also, the stores within the range of the radius will appear, and through the slider, users can reduce the distance filter down to 0.1 Miles. Furthermore, the default value of the radius distance is the distance from the user’s current location to the farthest store.
For example, if the store locator is showing 3 stores A, B, and C, and each store is at the following distance from the user's location:
- Store A - 5 miles
- Store B - 8 miles
- Store C - 12 miles
In this case, the longest distance is 12 miles which will be the default value of the distance slider and the radius. A user can easily change this by applying a fixed value to it by using the below shortcode
In the above shortcode, the value for the fixed radius is 10 (miles or kilometers). Therefore, all the stores within a 10 mile/km radius will be visible.
2- Changing Distance Values for the Dropdown Distance Menu
Users also have the flexibility to choose how many values appear in the “Dropdown” distance control. In addition, the default value can also be set for the dropdown menu.
In “ASL Settings”, under “Search Dropdown Options” users can set what values they want to appear in the menu. Furthermore, the default value is selected by adding a “*” before the default value.
For example, if a user typed [10, 20, *30, 40, 50] in the “Search Dropdown Options” as shown below.
The resulting map will look like the below image, with all the values that were added in the field and 30 as the default value.
3- How to Define a Different Radius for Each Store
Users can assign a separate store radius base for each store which will display each store on the map if they fall within a search range. For example, let's suppose you have three stores A, B, and C that you want to assign a radius of 5 KM, 7KM and, 9KM respectively. Therefore, if a searched store is within range with any of these stores, they will appear on the store listing. Furthermore, to implement this feature, please follow the below steps:
- Go to "ASL Settings" and head over to the "Manage Additional Fields" section
- Create a custom field label called “Radius” with the control name “radius” in the custom field manager
- Add the store radius values for each store, this can be done through the CSV file import or through the form
- Once the store radius has been assigned, use the below shortcode to enable this functionality
How to Disable Distance Control?
If you don't want to filter out the results based on the distance, please simply disable the distance control from the ASL Settings, and your stores will not be filtered based on the distance.