Would like closest result to appear on each page

Home Forums Store Locator Plus Would like closest result to appear on each page

This topic contains 1 reply, has 2 voices, and was last updated by  Lance Cleveland 1 year, 11 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #26587

    Michael
    Participant

    I am looking to display the closest location result in the header of each page. At a very high-level, the hope is to:

    1) Check if a result is stored in a cookie

    2) If not, attempt to a) use location services to grab current location and execute a search and b) as a fallback use IP location information to execute a search if location services are not available due to the age of the browser or permission denial of the user.

    So, I’m wondering… am I able to use the SLP framework to execute a one-off search like this and display the returned data? Can’t seem to find documentation around available hooks.

    Hope that makes sense.

    #26670

    Lance Cleveland
    Keymaster

    Not sure what you mean by “result is stored in a cookie”.

     

    The base plugin uses the JavaScript interface via the Pro Pack add-on to provide the location sensor service.  IP Fallback is dependent on the browser as to how the location is determined.

    To add this to the page you will need to use the slplus shortcode.  You can use the various add-on packs like Enhanced Search and Enhanced Map to hide the search form and map if you do not want it.   You can limit the number of results returned on turn on immediate search mode with shortcode attributes or global settings on the User Experience tab.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.