J
J
jazzman72018-06-20 18:10:33
WordPress
jazzman7, 2018-06-20 18:10:33

How to define a city?

Good day. I want to do as in the screenshot, so that there would be a choice of the city, not necessarily even automatically, you can do it manually, and after choosing the city, the selected city was in the woocommerce order. It is desirable to do something else so that, depending on the city, the phone number also changes. Please tell me how to implement
5b2a6e1766666549628933.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Taratin, 2018-06-20
@Taraflex

For city detection, the easiest way is to take https://sypexgeo.net/en/docs/
You can also make a pop-up window yourself.
We write the selected city (automatically or manually) in the cookie so that there is no need to detect the user on each request.
On the server, when placing an order, we put down the city from cookies.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question