28d 2018 Day 8 – Countries and States

By | June 4, 2018

28d 2018 Day 8 – Countries and States

This HT module allows you to modify the Country Dropdown without having to manually remove countries from your database. If a Country has Zones (eg; US – States), the States dropdown will invoke based on the selected country.

On the Admin Side

  • You can set which countries should show in the Country Dropdown.
  • You can set a default country (when the page laods this country shows instead of “please select”).
  • You can say which pages this script should invoke on.
  • You can make the dropdown readonly (good if sell to only 1 country).

Shop Side

The “State” input greys out and asks the user to first select their country.

If they select a country which has zones (eg USA), the state fields instantly turns into a dropdown of the correct states to choose from:

If they choose a country that has no states (eg UK), the state input turns into a normal input box so that they can type their county/state.

All of this is done in the background without a page reload.

Type of Module

Header Tag – simply upload, turn on, and set your parameters of configuration

Core Code Changes

None

Leave a Reply

Your email address will not be published.