• Would anyone happen to know how to fix this? One of our stores (European Kitchen & Bathworks) is correctly added to our list of stores, and when you type in their zip code to find their showroom (30324), another showroom pops up first (Barbara Shelton Designs) even though they are a different zip code. Both locations are in the same city of Atlanta in the U.S. state of Georgia, but do not share the same zip code. I am confused as to why Barbara Shelton Designs comes up first in the results when I do a search for European Kitchen & Bathworks via their specific zip code. Thanks!

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    Searching by zip code only can sometimes return unexpected results when the Google Geocode API has trouble finding the expected location. The 30324 may also point to something else in Google’s database.

    If you search for the address itself, then the correct location does show up?

    Does it work better if you enable the ‘Force zipcode only search’ search option on the settings page?

    Thread Starter Drew75

    (@drew75)

    If I do a search for the address itself, yes, it is the first result to display, but most people will not search in that way.

    As for the ‘Force zipcode only search’ search option, I suppose that feature is available in a newer version of the plugin. I am running version 1.2.25 and unfortunately, when I tried updating the plugin recently for another issue, it was breaking the usability of our locator so I had to do a restore.

    Plugin Author Tijmen Smit

    (@tijmensmit)

    Yeah, it’s only included in the latest versions.

    But if you’re comfortable with code, then I can point out the code section in the latest version that you can included in your version. This will make the search only work with zip codes, so searching for city / street names won’t return any results anymore.

    Thread Starter Drew75

    (@drew75)

    That would be fine. Please provide the code and I will give it a try. Thank you!

    Thread Starter Drew75

    (@drew75)

    Just following up on this. Please send me the code snippet ASAP. Thank you!

    Plugin Author Tijmen Smit

    (@tijmensmit)

    This is the code in the latest version that makes sure the zipcode only search works, it’s untested, but making two modifications in the JS file in the older 1.x version should fix it.

    First look for this function.

    Replace line 491 with this,

    request.componentRestrictions.postalCode = $( "#wpsl-search-input" ).val();

    and replace line 493 with this.

    geocoder.geocode( request, function( response, status ) {

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Incorrect location displaying first when inputting desired locations zip code’ is closed to new replies.