Skip Navigation

[Resolved] Asking for location on results page but need to have location set on search page

This support ticket is created 6 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 5 replies, has 2 voices.

Last updated by Shane 6 years, 5 months ago.

Assisted by: Shane.

Author
Posts
#1106643

I am trying to: get the users location on the search page instead of the results page. Whats happening is the results page is displaying an error until the user clicks to share location. Also if location sharing is turned on sometime the page still shows the error until fully loaded.

Link to a page where the issue can be seen: hidden link << select a location and hit search. The results page is here: hidden link or hidden link depending on what search tab you use.

I expected to see: The results but instead
Instead, I got: the location services error repeated over and over from an internal loop. Also if location sharing is turned on sometime the page still shows the error until fully loaded.

#1106830

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Rich,

Thank you for contacting our support forum.

So pretty much the issue here is that if you link directly to the page you will get the error.

I see on the search form that you have the address bar field and if this is filled out it works fine.

I think its actually expecting an address and behaves like this if non is provided correct?

Please let me know.

Thanks,
Shane

#1107661

Is it possible to get the user location prior to the results page? meaning the coordinates of the website visitor before the results page?

The results page requires the users location. So if it doesn't have the users location it askes for it via browser notification, then if the user click YES to share their location it displays the results.

An example would be when I come to the search page I get a browser notification that asks if I would like to share my location.

#1107754

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Screen Shot 2018-09-13 at 2.32.06 PM.png

Hi Rich,

That is possible to do from the search page but not from the results page if you go directly to it.

There is a distance filter that you can add to your search page to get the user's current location.

With this you can get the user's current location as well as they can set the distance to which they want results from.

Thanks,
Shane

#1107759

The distance filter is there and is set to 20 Miles but I used css to display:none;. So setting that did not get the users location.

#1107761

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Rich,

Since you hid the button then there isn't a way to really get the user's location then. They would need to manually enter it into the field .

Thanks,
Shane