call to replace anchor tags contains '/admin' in href

Set up city list for auto generation

On the checkout flow in the address page a customer enters text value for the CITY field. However, you can add the cities manually as per the states. This will enable the functionality in which once a state is selected then only the selected cities are listed in the dropdown. 

Shipping Address Form:

City List Auto generated in Checkout flow

Follow the steps mentioned below:

  • Click on the shipping_address to open the Shipping adress form.

  • In the city field, change the option in the Type field to Select.
  • Next, click the settings icon in the Action column. This will open up the 
  • In the Options section, click on the Add Options button. This will show up the options field.

  • Now, the field Name and Value field appears. Provide the name of the city in both the fields.

  • After entering the name and value, click the Insert Option button. Similarly, add all the cities of the particular state which you want to show in thr dropdown.
  • When you have added the cities, you need to add the state for which the added cities will be shown.
  • In the Show On section, click the Add Show on button. 
  • Provide "state" in the Field and select "equal" in the operator.
  • Enter the state name in the Value field.
  • Click on the Insert Show on button.

  • After adding the Show on, click the Save button.
  • Now, the added city list for the selected state will be shown.

Before Selecting State:

After Selecting State:

Adding cities for more states

You might want to add cities from more states. To do so, follow the steps given below:

  • Proceed to add extra field by clicking the Add Field button.

  • Now, enter the value "city" in theField Label, "city" in the Field Name, and choose the "Select" option in the Type field.
  • After that, click the settings icon.
  • Add options and show on in the Option and Shown On field respectively.
  • Finally, save the details.

In this way, you can add multiple cities from different number of states. So, when the any state will be selected, cities added in that state will be available for selection in the dropdown.

Share:

2020-09-01T10:06:42.547Z