I want to change the city name to dropdown menu like in dropdown it shows specific cities name like NYC, Mumbai,HongKong,Karachi and etc how is it will be possible?
Magento – How to change the City Name to Drop Down on Checkout Page. Magento 2
checkoutdropdown-optionsfrontendmagento2
Best Answer
Override layoutProcessor block for customize city field and change arguments of onepage block for render city options.
Initialize custom component and
[import][initialoptions]
to get city array in city.jsAdd your city here, else better get cities from csv to avoid big array.
Render city options from initialoptions and filter with region_id
Save city name instead of city value to database.