Tell us what you are trying to do?
When the user enters the product page url, he doesn't have the option to buy it.
Instead, it must provide a map with all the stores where he can purchase that product.
1 - This is possible by extending Woocommerce post type and using a repeatable field (for every store that sells that product) group with a google map field, correct?
2 - Sometimes the google maps is not 100% acurate on the location, would it be possible to have option to insert the address using gps coordinates?
Actually the planned workflow really doesn't need Woocommerce since it won't need any payments, but i was wondering about this approach.
thanks
1 - This is possible by extending Woocommerce post type and using a repeatable field (for every store that sells that product) group with a google map field, correct?
Hi, yes this is one way to do it. You can create a repeatable field group (RFG) that contains an address field, and loop over those RFGs to place markers on a map.
Or, you can create a custom post type called "Locations" or "Stores" or something similar, and place an address custom field on that post type. Then you can create a many-to-many relationship between Locations and Products. This approach is more convenient because there is less duplication of data when multiple Products are sold in the same Location.
2 - Sometimes the google maps is not 100% acurate on the location, would it be possible to have option to insert the address using gps coordinates?
Yes, it's possible to use numeric latitude and longitude coordinates like "40.673113, -73.983124". When you use your own custom latitude and longitude coordinates, however, you lose the text-based address. For example, let's say I enter New York, NY USA as the address. I don't like the placement of the marker so I adjust it slightly in wp-admin to use a specific latitude and longitude. Once I do that, the address field now shows the latitude and longitude coordinates, not "New York, NY USA". In theory you could use two fields. One address field with coordinates for the accurate map placement, and another simple text field for the text-based address.
Hi Christian,
First of all, thank you for your time.
I don't like the placement of the marker so I adjust it slightly in wp-admin to use a specific latitude and longitude.
Is this possible also on the frontend using Toolset Forms?
Just 1 additional question:
When the user presses the button "Find stores that sell this products near me", it appears the popup to allow location tracking along with the map.
How is this tracking made by toolset (and Google Maps)? In desktop i know it's based on IP Address location, but when on mobile it's based on GPS correct?
it will allow also for search stores near adress X too, besides the IP/GPS tracking.
This will be possible out-of-the-box with Toolset?
Thanks
Is this possible also on the frontend using Toolset Forms?
Yes, you can see an example in the Form here:
https://christiancox-22119-td-1.discover-wp.com/add-new-tour/
The Address field can accept an address, or you can use the "Show/Hide Coordinates" link to input a specific lat/long.
How is this tracking made by toolset (and Google Maps)? In desktop i know it's based on IP Address location, but when on mobile it's based on GPS correct?
It uses the HTML 5 Geolocation API, which is supported by modern browsers, including mobile device browsers. It relies on different criteria to determine location, including GPS and WiFi, and requires the HTTPS protocol for security: https://en.wikipedia.org/wiki/W3C_Geolocation_API
it will allow also for search stores near adress X too, besides the IP/GPS tracking.
Yes, your site visitors can search for stores near a specific address. Example here: https://christiancox-22119-rel-1.discover-wp.com/map-search/
Thank you Christian.
Althought your first link is protected under login, i believe in your word.
Thank you for your out-of-the-box support and clear answers. You are definitly our favorite supporter for all the detailed explanations.