• Hi again,
    I have come across an issue where if the auto location is not working (or is disallowed by the user) on load then I am getting errors – specifically underscore.js issues where the store_meta is not defined – I guess as there are no results on which it can be retrieved.

    I don’t of course expect any support around custom code I’ve created but what I would like to achieve is a fallback option if the users location is not available when the map loads.

    I’ve noticed that in some Safari versions as well as Firefox that an alert shows on load (The application does not have permission to use the Geolocation API) – I assume this is a standard alert when the site has been disallowed location access by default.

    I guess in summary – if for whatever reason the users location is not available on load then should stores not load based on the default location set in “Start point” in settings?
    EDIT: I have established that in these situations the map is defaulting to the “Start point” and a start marker is showing, but the location isn’t being passed so no store are loading. If the user then drags the start marker or manually enters a location then the stores load…

    • This topic was modified 2 years, 7 months ago by southafricanrob. Reason: Added more info
Viewing 1 replies (of 1 total)
  • Hi again,

    We do have a filter for dealing with no results. It is wpsl_no_results.

    You can create a custom template with the info you want to show in that case, maybe showcasing your flagship store, an error message, or whatever.

    On the other hand, if the user’s location is not available then the plugin will default to the start point defined in the settings.

    Bear in mind that as soon as a Javascript error is triggered on the execution of the page’s javascript code, all kind of side effects can happen, so the first thing would be to try and make sure no javascript errors are returned from the browser if you have done some custom code.

    Regards,

Viewing 1 replies (of 1 total)
  • The topic ‘No location is causing errors’ is closed to new replies.