Here is a discussion with a customer that was having issues with the locator not behaving as he expected. He is using Enhanced Search to show a state selector, hiding the radius box, and using Tagalong categories to help filter results between a “jobs” and “schools” listing of locations. Here is a discussion about how the Store Locator Plus settings impact the state selector behavior.
Here is how SLP works by default:
Return all locations within X miles of the entered address.
X is the radius the user selects. When the map is first loaded it uses the default radius under User Experience / Search Form / Radii Options (the radius in parenthesis) if Immediately Show Results is turned on (this is the default).
When the map is first loaded the “entered address” is either Coffeyville Kansas (don’t ask – that is just where Google decides the center of America is and thus defaults to that) OR the address you entered under User Experience / Center Map At.
On the initial map load this means it will show all locations within 500 miles of the center of America (Coffeyville).
How SLP works when you add Enhanced Search “search by state” and turn on “Discrete Mode”:
By default discrete mode adds a filter to the searches where it appends a “only if in the selected state”, CA for example, to the search.
Given the above default behavior, if you turn on the State Search selector and set it to discrete search you can get some unexpected results. If the user leaves the address box blank, or you disable “address input” so they cannot enter and address, they select a state such as CA and leave the radius drop down at 500 miles you end up with a search that says “Show me all locations in CA that are within 500 miles of Coffeyville”. You get no results.
How To “Fix” Discrete Mode
Recently Enhanced Search was updated to add a new “Radius Behavior” option under User Experience / Search Form. There is an option to “Ignore radius unless address entered”. With this option selected the above search will work as anticipated. When the address is left blank, or address input is hidden, the search will ignore the radius option. The user selects CA from the drop down and regardless of what the radius is set to it is ignored (address input is blank at this point). The search now becomes “Show me all locations in CA that are within ANY DISTANCE of Coffeyville”. This will return all locations in CA.
Why not automate the discrete search?
Good question. The new “ignore unless address is blank” option just came online. The coding was not in place to automatically do this until a few weeks ago. Going forward some consideration needs to be made for automatically going into this “ignore radius” mode when the address is blank and a state (or city or country) is selected.
However, there always seems to be some caveat to doing this. Someone will inevitably complain that “something has changed” when opting to be “smarter” about how the feature works. With 45,000+ sites using the product changing how things “behaved yesterday” when coming out with a new patch is something that mandates extra consideration.