My client sells products in approx 4,000 stores and we need a dealer locator function. I created the Custom Post type and fields. I created an import using WP allimport and successfully imported the content into the new Dealer Posts. However the posts are not displaying. if I go and click on a post it will then show on the front end. With that many dealers I can't go and click on each one. We also want the ability to upload new dealers in the future.
Also, we would like the ability to search based on a location. When I use the Distance filter it allows me to enter a location into the "Enter a Location" field but nothing happens. I can click the "Use my Location" button. But they want the ability for more flexibility. Is it supposed to do a search when you select the address? Can you turn off the geolocation and "Use my Location" button?
Is there any documentation that you are following?
Is there a similar example that we can see?
What is the link to your site? hidden link
Thanks!
Kevin
New threads created by Minesh and linked to this one are listed below:
Hello. Thank you for contacting the Toolset support.
My client sells products in approx 4,000 stores and we need a dealer locator function. I created the Custom Post type and fields. I created an import using WP allimport and successfully imported the content into the new Dealer Posts. However the posts are not displaying. if I go and click on a post it will then show on the front end. With that many dealers I can't go and click on each one. We also want the ability to upload new dealers in the future.
==>
The problem you mentioned above is known to us and we already have internal ticket with our Devs, what I can do is I'll raise your voice to our internal ticket that will help our Devs decide the priority of this feature. Please note that there is no ETA on it. I'll update you here when we officially add the solution for this problem to our plugins.
Also, we would like the ability to search based on a location. When I use the Distance filter it allows me to enter a location into the "Enter a Location" field but nothing happens. I can click the "Use my Location" button. But they want the ability for more flexibility. Is it supposed to do a search when you select the address? Can you turn off the geolocation and "Use my Location" button?
==>
As per the support policy, we entertain only one question per ticket, hence, I will split the ticket for this new question.
Thanks for the reply and explanation. Per the ticket you sent me to, I deleted the distance query filters and now the page shows all the posts but they are not being geocoded. I feel like I am missing something.
Is it possible to have them geocoded outside of Toolset and import the long and lat?
Thanks
Kevin
I do not have any other alternative rather asking you to wait for the feature to be added to our plugin in near future.
As acknowledged, this feature known to us and should be added to our plugin in near future and we already have internal ticket and the only thing I can do is raise your voice to our internal ticket that should help to prioritize it but again there is no ETA on it.
Hello and thanks for the reply,
Just so I am clear, there is no way to import the geocoding data?
Also on the ticket that you referred to https://toolset.com/forums/topic/view-with-maps-didnt-work-after-import-from-module/#post-1393273
they were successful in getting the geocoding to occur, so I was hoping that we could make sure what I was doing was correct before I look for another solution. Perhaps that support specialist may be able to take a look?
Thanks again.
Kevin
Hi, Minesh asked me to take over this ticket since I provided a workaround in the other ticket. When I check the page now, I see a few results on the map here: https://flashpoint.digital/bonide2/bonide-dealers/
I'm not able to submit an address easily, there is no submit button in this search form. So I'm a bit confused about what is happening, but if you'd like to provide login credentials to the site in question, I'll be glad to take a closer look.
From your previous instructions it seemed that you suggested to remove all distance filtering as well as the map. So I did that on a separate page here - this is just a listing of the posts so I dont think it will do a geolocation lookup.
Okay, I think you've identified the source of the disconnect between what I was suggesting and what you have implemented. The unfiltered View here must also include a map with markers displaying each result address. Without a map marker displayed, geocoding will not be triggered for each result. Loading that View on the front-end will trigger geocoding for each address marker that should be included on the map, with restriction quotas applied by Google Maps (I think 10 addresses/second) and Toolset Maps (hard-coded limit of 5 addresses per request). So sometimes multiple refreshes are necessary per page to geocode all the results for that page. I've asked our developers to improve the Toolset Maps hard-coded limit of 5 addresses per request to help speed up this process for imported posts, but that request has not yet been implemented. Modifying that Toolset Maps quota value requires editing core plugin files to change the API_CALL_THROTTLE_MAX constant value. Obviously that means updates to the Maps plugin will overwrite that change. Basically there's not an easy way to configure this quota externally.
Regarding importing geocoded address cache, most import/export plugins aren't configured to process Toolset's custom database table used for storing those cached addresses, so they won't import them automatically. WordPress's own import post functionality won't include them either. However, you might be able to import that cache data directly into the database via SQL import. I haven't tested this and there's no documentation available about it, but you could try importing some location information for one or two existing posts directly into the wp_toolset_maps_address_cache database table of a test site. It may or may not work, it's not a supported feature.
Thanks for your help, it is geolocating with a couple of refreshes per page after adjusting the API_CALL_THROTTLE_MAX value. At least it goes a little more quickly. While not ideal at least it is a path forward.
I am concerned how future imports will work. Does this workaround only work if there is no distance filtering?
I am concerned how future imports will work. Does this workaround only work if there is no distance filtering?
Yes, this workaround is intended to be used to force the system to geocode imported addresses in a somewhat automated way. If you add a distance filter to this View, that will break the workaround because distance filtering requires geocoded addresses. Those addresses that have not yet been geocoded will not be included in the results produced by a distance-filtered map query, bypassing the whole trigger process. Ideally you would set up a system cron that hits all the paginated results of this View to trigger a geocoding request for each imported result. Once that process has completed, distance filtering in some other View(s) on your site would begin including all those geocoded results in the filtered map markers.
If you wanted to optimize this View's results, you could add an import date custom field value when you import dates, and filter the View by this import date field somehow. That could limit the results in this View to some specific import date, rather than including all the old import values as well in the automatic process, assuming old imported values have already been geocoded. That's not really necessary, but it could be useful here for setting up the cron programmatically.
I am not sure how I would create a cron script that would hit all of the new entries. The idea to create a date or version of the import is do-able though. So any new subset that is uploaded can be viewed and geocoded without having to go through the entire list.