Skip Navigation

[Resolved] listing website placing maps in woocommece product

This support ticket is created 6 years, 9 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.

Our next available supporter will start replying to tickets in about 0.63 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

Author
Posts
#552317

I am trying to:
Create a listing website.
People will pay for the listed products, not for the right to post listings.
I thought that I could generate WooCommerce Products using CRED forms, so the listing could be frontend uploaded. Once in place costumers interested in that product could add it to their checkout.
The problem is that I need to geolocate these products - meaning I have to implement a search of said products by city and address. I imagine that in order to do that I need to somehow integrate the maps plugin into woocommerce products.

Am I correct? Would it work?

Link to my site:

I expected to see:

Instead, I got:

#552621

It is possible to add an address custom field to the WooCommerce Product post type, so you can geocode each standard product. However, you should be aware that there is no radius-based address filter in Toolset. It is possible to search for products using address and city, but if the address and city on the product are not a perfect match then the filter will return no results. In other words, there is currently no way to specify 'all results within 1 mile / 1 km' or some other radius-based search.

We do offer the wpv-filter-query hook that can be used to manipulate a WordPress query on-the-fly using PHP. If you want to implement a radius-based search of your own, you can use your own PHP formula to determine proximity and alter the query. This will require custom code, and the algorithm used to create a radius-based search is not something I can help you with here in the forum.

Let me know if you have additional questions about the address custom field.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.