Flow/Configure countries regions states

From Aimeos documentation

Flow
Other languages:
English 100%


Countries

If you want to ship your products to several countries or you need to know from which countries your customers are, you have to enable the country selection in the address page of the checkout process.

By default, the country list is hidden for the billing and delivery address in the checkout process. To make show them and make them mandatory you need to add "order.base.address.countryid" to the list of values defined in

In TYPO3 Flow this is configured for billing and delivery addresses via the YAML configuration:

  1. Aimeos:
  2.   Shop:
  3.     client:
  4.       html:
  5.         checkout:
  6.           standard:
  7.             address:
  8.               billing:
  9.                 mandatory:
  10.                   - order.base.address.salutation
  11.                   - order.base.address.firstname
  12.                   - order.base.address.lastname
  13.                   - order.base.address.address1
  14.                   - order.base.address.postal
  15.                   - order.base.address.city
  16.                   - order.base.address.languageid
  17.                   - order.base.address.email
  18.                   - order.base.address.countryid
  19.               delivery:
  20.                 mandatory:
  21.                   - order.base.address.salutation
  22.                   - order.base.address.firstname
  23.                   - order.base.address.lastname
  24.                   - order.base.address.address1
  25.                   - order.base.address.postal
  26.                   - order.base.address.city
  27.                   - order.base.address.languageid
  28.                   - order.base.address.email
  29.                   - order.base.address.countryid

If no selection should be enforced, you can use instead

To make the country for billing and delivery addresses optional, use this configuration:

  1. Aimeos:
  2.   Shop:
  3.     client:
  4.       html:
  5.         checkout:
  6.           standard:
  7.             address:
  8.               billing:
  9.                 optional:
  10.                   # ... other optional fields ...
  11.                   - order.base.address.countryid
  12.               delivery:
  13.                 optional:
  14.                   # ... other optional fields ...
  15.                   - order.base.address.countryid

The list of countries is defined by the values added to the configuration key client/html/checkout/standard/address/countries. The configuration below will add all countries worldwide to the select boxes for the billing and delivery address:

  1. Aimeos:
  2.   Shop:
  3.     client:
  4.       html:
  5.         checkout:
  6.           standard:
  7.             address:
  8.               countries:
  9.                 - AD # Andorra
  10.                 - AE # United Arab Emirates
  11.                 - AF # Afghanistan
  12.                 - AG # Antigua and Barbuda
  13.                 - AI # Anguilla
  14.                 - AL # Albania
  15.                 - AM # Armenia
  16.                 - AO # Angola
  17.                 - AQ # Antarctica
  18.                 - AR # Argentina
  19.                 - AS # American Samoa
  20.                 - AT # Austria
  21.                 - AU # Australia
  22.                 - AW # Aruba
  23.                 - AX # Åland Islands
  24.                 - AZ # Azerbaijan
  25.                 - BA # Bosnia and Herzegovina
  26.                 - BB # Barbados
  27.                 - BD # Bangladesh
  28.                 - BE # Belgium
  29.                 - BF # Burkina Faso
  30.                 - BG # Bulgaria
  31.                 - BH # Bahrain
  32.                 - BI # Burundi
  33.                 - BJ # Benin
  34.                 - BL # Saint Barthélemy
  35.                 - BM # Bermuda
  36.                 - BN # Brunei Darussalam
  37.                 - BO # Bolivia, Plurinational State of
  38.                 - BQ # Bonaire, Sint Eustatius and Saba
  39.                 - BR # Brazil
  40.                 - BS # Bahamas
  41.                 - BT # Bhutan
  42.                 - BV # Bouvet Island
  43.                 - BW # Botswana
  44.                 - BY # Belarus
  45.                 - BZ # Belize
  46.                 - CA # Canada
  47.                 - CC # Cocos (Keeling) Islands
  48.                 - CD # Congo, the Democratic Republic of the
  49.                 - CF # Central African Republic
  50.                 - CG # Congo
  51.                 - CH # Switzerland
  52.                 - CI # Côte d'Ivoire
  53.                 - CK # Cook Islands
  54.                 - CL # Chile
  55.                 - CM # Cameroon
  56.                 - CN # China
  57.                 - CO # Colombia
  58.                 - CR # Costa Rica
  59.                 - CU # Cuba
  60.                 - CV # Cape Verde
  61.                 - CW # Curaçao
  62.                 - CX # Christmas Island
  63.                 - CY # Cyprus
  64.                 - CZ # Czech Republic
  65.                 - DE # Germany
  66.                 - DJ # Djibouti
  67.                 - DK # Denmark
  68.                 - DM # Dominica
  69.                 - DO # Dominican Republic
  70.                 - DZ # Algeria
  71.                 - EC # Ecuador
  72.                 - EE # Estonia
  73.                 - EG # Egypt
  74.                 - EH # Western Sahara
  75.                 - ER # Eritrea
  76.                 - ES # Spain
  77.                 - ET # Ethiopia
  78.                 - FI # Finland
  79.                 - FJ # Fiji
  80.                 - FK # Falkland Islands (Malvinas)
  81.                 - FM # Micronesia, Federated States of
  82.                 - FO # Faroe Islands
  83.                 - FR # France
  84.                 - GA # Gabon
  85.                 - GB # United Kingdom
  86.                 - GD # Grenada
  87.                 - GE # Georgia
  88.                 - GF # French Guiana
  89.                 - GG # Guernsey
  90.                 - GH # Ghana
  91.                 - GI # Gibraltar
  92.                 - GL # Greenland
  93.                 - GM # Gambia
  94.                 - GN # Guinea
  95.                 - GP # Guadeloupe
  96.                 - GQ # Equatorial Guinea
  97.                 - GR # Greece
  98.                 - GS # South Georgia and the South Sandwich Islands
  99.                 - GT # Guatemala
  100.                 - GU # Guam
  101.                 - GW # Guinea-Bissau
  102.                 - GY # Guyana
  103.                 - HK # Hong Kong
  104.                 - HM # Heard Island and McDonald Islands
  105.                 - HN # Honduras
  106.                 - HR # Croatia
  107.                 - HT # Haiti
  108.                 - HU # Hungary
  109.                 - ID # Indonesia
  110.                 - IE # Ireland
  111.                 - IL # Israel
  112.                 - IM # Isle of Man
  113.                 - IN # India
  114.                 - IO # British Indian Ocean Territory
  115.                 - IQ # Iraq
  116.                 - IR # Iran, Islamic Republic of
  117.                 - IS # Iceland
  118.                 - IT # Italy
  119.                 - JE # Jersey
  120.                 - JM # Jamaica
  121.                 - JO # Jordan
  122.                 - JP # Japan
  123.                 - KE # Kenya
  124.                 - KG # Kyrgyzstan
  125.                 - KH # Cambodia
  126.                 - KI # Kiribati
  127.                 - KM # Comoros
  128.                 - KN # Saint Kitts and Nevis
  129.                 - KP # Korea, Democratic People's Republic of
  130.                 - KR # Korea, Republic of
  131.                 - KW # Kuwait
  132.                 - KY # Cayman Islands
  133.                 - KZ # Kazakhstan
  134.                 - LA # Lao People's Democratic Republic
  135.                 - LB # Lebanon
  136.                 - LC # Saint Lucia
  137.                 - LI # Liechtenstein
  138.                 - LK # Sri Lanka
  139.                 - LR # Liberia
  140.                 - LS # Lesotho
  141.                 - LT # Lithuania
  142.                 - LU # Luxembourg
  143.                 - LV # Latvia
  144.                 - LY # Libya
  145.                 - MA # Morocco
  146.                 - MC # Monaco
  147.                 - MD # Moldova, Republic of
  148.                 - ME # Montenegro
  149.                 - MF # Saint Martin (French part)
  150.                 - MG # Madagascar
  151.                 - MH # Marshall Islands
  152.                 - MK # Macedonia
  153.                 - ML # Mali
  154.                 - MM # Myanmar
  155.                 - MN # Mongolia
  156.                 - MO # Macao
  157.                 - MP # Northern Mariana Islands
  158.                 - MQ # Martinique
  159.                 - MR # Mauritania
  160.                 - MS # Montserrat
  161.                 - MT # Malta
  162.                 - MU # Mauritius
  163.                 - MV # Maldives
  164.                 - MW # Malawi
  165.                 - MX # Mexico
  166.                 - MY # Malaysia
  167.                 - MZ # Mozambique
  168.                 - NA # Namibia
  169.                 - NC # New Caledonia
  170.                 - NE # Niger
  171.                 - NF # Norfolk Island
  172.                 - NG # Nigeria
  173.                 - NI # Nicaragua
  174.                 - NL # Netherlands
  175.                 - NO # Norway
  176.                 - NP # Nepal
  177.                 - NR # Nauru
  178.                 - NU # Niue
  179.                 - NZ # New Zealand
  180.                 - OM # Oman
  181.                 - PA # Panama
  182.                 - PE # Peru
  183.                 - PF # French Polynesia
  184.                 - PG # Papua New Guinea
  185.                 - PH # Philippines
  186.                 - PK # Pakistan
  187.                 - PL # Poland
  188.                 - PM # Saint Pierre and Miquelon
  189.                 - PN # Pitcairn
  190.                 - PR # Puerto Rico
  191.                 - PS # Palestine, State of
  192.                 - PT # Portugal
  193.                 - PW # Palau
  194.                 - PY # Paraguay
  195.                 - QA # Qatar
  196.                 - RE # Réunion
  197.                 - RO # Romania
  198.                 - RS # Serbia
  199.                 - RU # Russian Federation
  200.                 - RW # Rwanda
  201.                 - SA # Saudi Arabia
  202.                 - SB # Solomon Islands
  203.                 - SC # Seychelles
  204.                 - SD # Sudan
  205.                 - SE # Sweden
  206.                 - SG # Singapore
  207.                 - SH # Saint Helena, Ascension and Tristan da Cunha
  208.                 - SI # Slovenia
  209.                 - SJ # Svalbard and Jan Mayen
  210.                 - SK # Slovakia
  211.                 - SL # Sierra Leone
  212.                 - SM # San Marino
  213.                 - SN # Senegal
  214.                 - SO # Somalia
  215.                 - SR # Suriname
  216.                 - SS # South Sudan
  217.                 - ST # Sao Tome and Principe
  218.                 - SV # El Salvador
  219.                 - SX # Sint Maarten (Dutch part)
  220.                 - SY # Syrian Arab Republic
  221.                 - SZ # Swaziland
  222.                 - TC # Turks and Caicos Islands
  223.                 - TD # Chad
  224.                 - TF # French Southern Territories
  225.                 - TG # Togo
  226.                 - TH # Thailand
  227.                 - TJ # Tajikistan
  228.                 - TK # Tokelau
  229.                 - TL # Timor-Leste
  230.                 - TM # Turkmenistan
  231.                 - TN # Tunisia
  232.                 - TO # Tonga
  233.                 - TR # Turkey
  234.                 - TT # Trinidad and Tobago
  235.                 - TV # Tuvalu
  236.                 - TW # Taiwan
  237.                 - TZ # Tanzania, United Republic of
  238.                 - UA # Ukraine
  239.                 - UG # Uganda
  240.                 - UM # United States Minor Outlying Islands
  241.                 - US # United States
  242.                 - UY # Uruguay
  243.                 - UZ # Uzbekistan
  244.                 - VA # Vatican City State (Holy See)
  245.                 - VC # Saint Vincent and the Grenadines
  246.                 - VE # Venezuela, Bolivarian Republic of
  247.                 - VG # Virgin Islands, British
  248.                 - VI # Virgin Islands, U.S.
  249.                 - VN # Viet Nam
  250.                 - VU # Vanuatu
  251.                 - WF # Wallis and Futuna
  252.                 - WS # Samoa
  253.                 - YE # Yemen
  254.                 - YT # Mayotte
  255.                 - ZA # South Africa
  256.                 - ZM # Zambia
  257.                 - ZW # Zimbabwe

States and Regions

For each country you can freely define a list of states or regions that can be used afterwards to calculate the final price for each delivery option.

To define states or regions via the configuration use something like this:

  1. Aimeos:
  2.   Shop:
  3.     client:
  4.       html:
  5.         checkout:
  6.           standard:
  7.             address:
  8.               states:
  9.                 US:
  10.                   CA: California
  11.                   NY: New York
  12.                   # ...
  13.                 EU:
  14.                   W: Western Europe
  15.                   C: Central Europe
  16.                   # ...

The key you have chosen for the state or region will be stored in the order address of the customer and can then be used during the rest of the checkout process. More details can be found in the documentation of the configuration option: