Skip Navigation

[Resolved] Order by Distance

This support ticket is created 6 years, 2 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 11 replies, has 2 voices.

Last updated by Shane 6 years, 2 months ago.

Assisted by: Shane.

Author
Posts
#1112393
Bildschirmfoto 2018-09-20 um 20.22.09.jpg

Tell us what you are trying to do?
i Have Set up a Custom Post Type "Companys" and there is an adress Maps Field. But when i go into the View>Ordering i cannot choose distance.

What is the link to your site?
View with normal ABC Order hidden link

Aother Problem: When i active Pagination there a 0 results - when i disable the Adress Search then the pagination works fine. Adress without Pagination works fine too.

#1112421

Shane
Supporter

Languages: English (English )

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

Hi Phillip,

Thank you for contacting our support forum.

Actually this is not possible to sort the posts by distance. The addresses are sorted by alphabetical order.

So sort by distance it not possible.

Thanks,
Shane

#1112729
Bildschirmfoto 2018-09-21 um 08.22.17.png

Whats that setting for? and there are tutorials on the www that show that its possible?

#1112735

And why the pagination is not working with adress search?

#1113035

Shane
Supporter

Languages: English (English )

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

Hi Phillip,

I took a look at the documentation and was able to find the reference for it.

Seems that this was added in our latest Views update.

Is it working for you ? Also you are saying that the pagination does not work when there is an address on the page ?

Could you send me a link to the page where I can test this ?

Thanks,
Shane

#1114200

Of Course:
Frontend: hidden link

The Site you can Test is "bydistance"
and the "Test View" is called: 6093 / Suchergebnis Order by Distance

The Goal is that the Result is sort by the Distance from the Input Field (Bonus is, that there is a marker for the Search Position)
and that the results is 50 with pagination (only needed with sorting by distance)

#1114441

Shane
Supporter

Languages: English (English )

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

Hi Philipp,

I tried to log in but the credentials dont seem to be working.

Could you check on them and let me know.

Thanks,
Shane

#1115050

Shane
Supporter

Languages: English (English )

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

Hi Phillip,

Thank you, I was able to log in.

Checking the pagination settings, I wasn't able to see any issues with it. The pagination works fine.

All I noticed that the pagination on the view was not setup, so I added the pagination for infinite scrolling.

Please let me know if this helps.

Thanks,
Shane

#1115143

thx! changed it to dropdown - worked fine (what was the wrong setting)?

more important - what can i do to sort the result by the disiance from the GET Parameter "toolset_maps_distance_center"

#1115206

Shane
Supporter

Languages: English (English )

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

Hi Phillip,

So you want to sort it by distance from the address that the map is centered on correct?

Unfortunately this doesn't seem possible as you can only set from a visitors location or from a fixed location.

Thanks,
Shane

#1115217

There should be a easy way of replace the "fixed" adress with the GET parameter? Is there any other Supporter with assistens ?

because fixed location makes no sense to me?

thx for figure that out

#1115733

Shane
Supporter

Languages: English (English )

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

Hi Phillip,

Unfortunately no it is not possible to use the GET parameter to sort the view from a distance.

The only dynamic option there is, is to sort it from the user who is doing the search. This way it will sort it based on the distance from that user.

The way you want it is that you want it to sort based on the distanced away from the searched address, which is not possible.

What you can do is to open a feature request ticket so that our development team can have a look.

Thanks,
Shane