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:
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.