Home / Customization / States

States


There is no need to customize US_States file if all states are to be viewed in the Billing & optional Shipping fields. Through customization individual states may be removed or brought to the top of the list as needed.

To edit US_States.xml start Notepad++ and open the US_States.xml

Clickits States Customization

As is seen in the XML the file has a lot of lines that follow similar syntax as below:

<State Name="Alabama" Abbrev="AL" visible="true">
</State>

Each State is defined within a STATE node. Its name is listed in the Name attribute as well as its abbreviation and visibility. There is no need to change Name and Abbrev attributes. If you don't wish to have a state shown in the pull down menu set its visibility to false. For example:

<State Name="Alabama" Abbrev="AL" visible="false">
</State>

In the above example Alabama will not appear in the pull down menu in the Billing & optional Shipping Information panel.

You may also move a state to the top of the list by using the optional <Order> child node. In the US_States.xml file provided Virginia is listed with the optional <ORDER> node.

<State Name="Virginia" Abbrev="VA" visible="true">
<Order>1</Order>
</State>

To move a state to the top of the list add <ORDER> child node to the state as shown above. The magnitude of the order is not important since the program will sort the ordered states from small to large. See below for an example:

<State Name="Virginia" Abbrev="VA" visible="true">
<Order>1</Order>
</State>
<State Name="Washington" Abbrev="WA" visible="true">
 <Order>100</Order>
</State>
 <State Name="West Virginia" Abbrev="WV" visible="true">
 <Order>110</Order>
</State>
<State Name="Wisconsin" Abbrev="WI" visible="true">
<Order>5</Order>
</State>

In the above example the states will be listed as follows:
  1. Virginia
  2. Wisconsin
  3. Washington
  4. West Virginia 
The states with the <ORDER> node will appear at the top of the STATES list sorted according to their respective order. States listed without the <ORDER> node will be alphabetically sorted after the ordered states.



 RSS of this page