• Michael McMahon

    (@mjmcmahon2010)


    Hi there,

    We have used the WP Store Locator plugin on this client website for a couple of years to show locations on a map and provide a search option to find a specific location.

    The client recently contacted me to say that the search isn’t working. There seems to be a couple of different things that happen depending on the search.

    1.) if I type part of the name of a recently added location (i.e. Thomas) – I just get no results found. Like this: https://prnt.sc/PSnvfsaLqkBt

    2.) if I type a word that is included in an address… I get results, but it seems to be all members, not just the one connected to the search. Example: https://prnt.sc/b4iMyYE1uS2J

    Is there anything I can do to get this working better? When we first setup the plugin, the search appeared to work.

    Thanks in advance for your help.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • farroyo

    (@farroyob)

    Hi there, thanks for reaching out.

    Actually what you are describing is the normal behaviour of the plugin. The ability to search by the store name you have entered in your backend has never been implemented yet, but we’re working on it for the upcoming 3.0 version.

    The search box only serves the purpose of searching location names or zipcodes, which in turn are sent to the Google Maps reverse geocode API to get a set of coordinates from your search term. These coordinates are used as the start point, and then the plugin retrieves stores from the database that are within X kilometers from that start point, where X depends on your settings or the search radius that you can choose to select from the search form.

    If the search has ever worked apparently as you mention it is by pure luck, because maybe some popular stores are correctly geolocated by Google just by their name, but it actually is not the most common behaviour and it you cannot trust it will work most of the time.

    As I said, proper support for searching by store name will be released alongside the upcoming 3.0 version of our plugin, so stay tuned!

    All the best,

    Thread Starter Michael McMahon

    (@mjmcmahon2010)

    Thanks for explaining all of that. I’m still a little confused by the results I’m getting though. If I do a search on a postcode, I still get all of the listings (that exist in the Store Locator) in the results, whereas I would expect the search to return only the listings that match that postcode.

    See screenshot here: https://prnt.sc/E2F2JSq3iSnR

    farroyo

    (@farroyob)

    Hi again,

    Well, continuing my previous reply, that is also the expected behaviour. When you search for a zipcode, the plugin sends it to Google Maps, and their geocoding service also returns a precise point (latitude, longitude) where Google Maps considers that the “center” of that zipcode is. From there, the plugin searches the database for stores within X radius from that precise point, and this obviously can end up retrieving stores from nearby zipcodes, as the search is strictly distance-based, not zipcode-based.

    Again, we are working on refining the search mechanisms for version 3.0, but right now that is exacty the way the plugin works ??

    Please get back if you still find something weird in your results.

    Regards,

    Thread Starter Michael McMahon

    (@mjmcmahon2010)

    Okay, understood. Thanks very much for your prompt replies!

    Mike

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Search is not working as expected’ is closed to new replies.