Difference between revisions of "X-Cart:Countries"

From X-Cart 4 Classic
Jump to: navigation, search
m
m
Line 1: Line 1:
Countries in your store can be managed using the '<u>Countries Management</u>' section of the Admin area (In X-Cart versions 4.3.0 and later, this section can be found at Settings menu -> Countries; in earlier versions, this section can be found at Administration menu -> Countries). This section contains a dialog box titled '<u>Countries</u>' which provides a table of country names and allows you to adjust attributes of individual countries: country codes, absence/presence of states and active/inactive status.
+
Countries in your store can be managed using the '<u>Countries Management</u>' section of the Admin area (In X-Cart versions 4.4.0 and later, this section can be found at Shipping and Taxes menu -> Countries; in X-Cart versions 4.3.0-4.3.2, this section can be found at Settings menu -> Countries; in earlier versions, this section can be found at Administration menu -> Countries). This section contains a dialog box titled '<u>Countries</u>' which provides a table of country names and allows you to adjust attributes of individual countries: country codes, absence/presence of states and active/inactive status.
  
 
[[Image:countries.gif|562px]]
 
[[Image:countries.gif|562px]]

Revision as of 14:55, 30 July 2012

Countries in your store can be managed using the 'Countries Management' section of the Admin area (In X-Cart versions 4.4.0 and later, this section can be found at Shipping and Taxes menu -> Countries; in X-Cart versions 4.3.0-4.3.2, this section can be found at Settings menu -> Countries; in earlier versions, this section can be found at Administration menu -> Countries). This section contains a dialog box titled 'Countries' which provides a table of country names and allows you to adjust attributes of individual countries: country codes, absence/presence of states and active/inactive status.

Countries.gif

The links provided at the top of the 'Countries' dialog box (All regions, North America, Europe, etc) allow you to view and manage sets of countries located in the named regions.

Table columns provide the following information:

  • CODE - ISO 3166-1 alpha-2 country codes (unique two-letter codes assigned to countries). These codes are used for X-Cart's inner processes and also appear in 'State' drop-down boxes when the JavaScript version of X-Cart's state and county selector is disabled.
  • COUNTRY - Country names.
  • HAS STATES - Check boxes whose status indicates absence/presence of states in a country. You do not need to worry about adjusting 'has states' boxes if you are not going to use the JavaScript version of X-Cart's state and county selector. However, if you wish to use the JavaScript selector and enable the respective option in General settings->General options, you need to have reliable information as to the territorial division of countries to which you are going to sell products. At least, you need to keep enabled the check boxes of countries for which you are going to define states. You also do not want to disable 'has states' check boxes for countries of whose 'has states' status you are not sure (If it turns out such a country really has states, customers from this country will be able to enter state names using an input box).
  • ACTIVE - Check boxes whose status defines whether a country is included into 'Country' drop-down menus or not (Only countries whose 'active' check box is selected are included). By default, all the countries in the table are active. If you need to limit the number of countries from which profile registrations will be welcome, deactivate all the countries that you do not want to be included.
Note: The country displayed in the table against a darker grey background is the country of location of your default customer.

Adding/deleting countries

The set of countries that can be used in an X-Cart based store is rigidly defined in the system, so you cannot add new countries to the list or delete existing ones. What you can do is edit country names, activate/deactivate specific countries and change their 'has states' statuses.

If you do not wish some of the countries to appear in 'Country' drop-down boxes on user registration/user profile forms, simply deactivate the countries that you wish to be excluded.

If a country you need is not on the list of available countries, request assistance from X-Cart technical support team.

Editing countries

To edit a country name, find the name in the table, replace it with a new one and click the Update button.

To change a country's 'has states' status, adjust the check box opposite its name in the HAS STATES column and click the Update button.

To activate/deactivate a country, select/unselect the check box opposite its name in the ACTIVE column and click the Update button. You can use the Check all / Uncheck all links located above the 'Countries' table to select or unselect all the 'active' check boxes on the current page. You can also activate/deactivate all the countries in the table regardless of the country set selected with a single click: by using the buttons Activate All and Deactivate All.

Multilingual country names

It is possible to have different names for your active countries that will be used depending on the language selected for the interface. Names for countries can be created using the 'Edit languages' section of your store (In X-Cart versions 4.4.0 and later, this section can be found at Content menu -> Languages; in earlier versions, this section can be found at Administration menu -> Languages).

To add country names in a language that does not yet have its own names for countries:

  1. Go to the 'Edit languages' section.
  2. Select the necessary language for editing. Make sure the charset specified in the 'Edit language' form is correct. If not, enter the necessary charset code and click the Change button.
  3. Use the language selector to switch the current language of the Admin area to the target language.
  4. Enable your computer to type in the selected language.
  5. Select the topic 'Countries' in the language variables filter.
  6. Use the 'Edit language entries' dialog box to translate the necessary country language variables into the selected language and apply the changes by clicking the Update all button.

FAQ

How to add a new country?

To add a country, you need to add an entry to xcart_countries table, and one more entry to xcart_lanuguages table.

For example, for Republic of Serbia you need to use the following SQL queries:

INSERT INTO `xcart_countries`
(`code`, `code_A3`, `code_N3`, `region`, `active`, `display_states`)
VALUES ('RS','SRB','688','EU','Y','Y');

INSERT INTO `xcart_languages`
(`code`, `name`, `value`, `topic`)
VALUES (`en`,`country_RS`,`Serbia`,`Countries`);

Here is the structure and possible field values for table xcart_countries

Region codes (possible values):

  • NA - North America
  • EU - Europa
  • AU - Australia and Oceania
  • LA - Latin America
  • AS - Asia
  • AF - Africa
  • AN - Antarctica

The last two capital letters of `country_RS` represent the two-letter country code for Republic of Serbia.