Change the Search Radius

Modified on Fri, 1 Sep, 2023 at 3:32 AM

Overview

When an address is searched in Store Locator, a radius of all nearby stores is displayed. The distance around the searched address can be adjusted.

If the radius is increased, it will show a larger area so more nearby stores will appear.

If the radius is decreased, it will show a smaller area around the searched address.

To change the search radius, please follow the steps below.


Setup

  1. From within the Store Locator app, select Settings.

    select settings

  2. Select Display Settings.

    select display settings

  3. Copy and paste this code into the Page Footer HTML field:

    Note: Adjust the script as needed. This code will add a drop-down that displays distances of 1, 2, 5, 10, 25 miles and an option for no limit. The 1 mile option displays by default.

    <script>
    document.querySelectorAll(".search_within_distance select")[0].length = 0;
    var distances = [1, 5, 10, 25, 9999];
    var distance_labels = ["1", "5", "10", "25", "No Limit"];
    var sel = document.querySelectorAll(".search_within_distance select")[0];
    for(var i=0; i<distances.length; i++) {
     var opt = document.createElement("option");
     opt.text = distance_labels[i];
     opt.value = distances[i];
     sel.add(opt);
    }
    </script>

    paste this code in the Page Footer HTML

  4. Select Save

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article