Home / Customization / Countries

Countries


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

To edit countries.xml start Notepad++ and open the countries.xml (filenames are case sensitive).

ClickIts Country Customization

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

<Country Name="Afghanistan" Abbrev="AF" Code="004" visible="True" defaultSelected="False">
</Country>

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

<Country Name="Afghanistan" Abbrev="AF" Code="004" visible="False" defaultSelected="False">
</Country>

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

<Order>100</Order>

You may also move a country to the top of the list by using the optional <Order> child node. In the Countries.xml file provided United States is listed with the optional <ORDER> node.

<Country Name="United States" Abbrev="US" Code="840" visible="true" defaultSelected="False">

<Order>1</Order>

</Country>

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:

<Country Name="United Kingdom" Abbrev="GB" Code="826" visible="true" defaultSelected="False">

<Order>100</Order>

</Country>

<Country Name="Guernsey" Abbrev="GG" Code="831" visible="true" defaultSelected="False">

 </Country>

 <Country Name="Jersey" Abbrev="JE" Code="832" visible="true" defaultSelected="False">

 </Country>

<Country Name="Isle of Man" Abbrev="IM" Code="833" visible="true" defaultSelected="False">

</Country>

<Country Name="Tanzania" Abbrev="TZ" Code="834" visible="true" defaultSelected="False">

 </Country>

<Country Name="United States" Abbrev="US" Code="840" visible="true" defaultSelected="False">

<StatesFileName>US_States.xml</StatesFileName>

<Order>1</Order>

</Country>

In the above example the countries will be listed as follows:

United States

United Kingdom

The countries with the <ORDER> node will appear at the top of the COUNTRY list sorted according to their respective order. Countries listed without the <ORDER> node will be alphabetically sorted after the ordered states.

The countries.xml has an additional child node titled <StatesFileName>. The node allows for addition of files that have the respective countries' state or province listing. If a country has a StatesFileName listing the form will show the listed countries in pull down menu for the country. If no StatesFileName is offered an open text field will be offered instead of a pull down menu.

defaultSelected="False"

To set a country as selected by default change the defaultSelected attribute to "True".




 RSS of this page