As far as we know, by default, Magento 2 shows the city field in the input text. In some case, your store only ships the order to some cities, so the city field in the input text, it can not resolve your requirement.
Today, I provide you with a feature that allows the city field shows in the drop-down. The customer only can place an order when they select a city in the drop-down which you set it in the backend.
So where will the city drop-down be applied?
On the storefront:
- When the customer registers a new account.
- When the customer edits an address or creates a new address.
- When the customer estimates Shipping fee.
- When the customer places an order, the city drop-down will be displayed on both the shipping address and billing address.
On the backend:
- When the administrator edits the customer, the city drop-down will be displayed on the customer address.
- When the administrator edits an order, the city drop-down will be displayed on both the shipping address and billing address.
- When the administrator creates a new order on the backend.
- When the administrator adds the condition in the price rule, the shipping city will be displayed in the Cart attribute
See the video how this extension works.
https://www.youtube.com/watch?v=ugZXjsNKM0w&index=6&list=PL98CDCbI3TNslCicN4cJyR4_hBXR1clhW https://www.facebook.com/giaphugroupcom/videos/1707242979384945/
This extension is created by me, so if you want to use these features of the city drop-down, please do not hesitate to contact me now via:
- Skype: cuongnq87
- Facebook: https://www.facebook.com/giaphugroupcom/
- Extension link: https://www.giaphugroup.com/magento-2-city-dropdown-extension.html