In Opencart 4 we can add countries and their zones, zones are states or regions as per country. For adding countries go to admin >> System >> Localization >> Countries and for adding countries’ zones go to admin >> System >> Localization >>Zones. These countries and zones are used in the Shipping Address and payment address, and while registering as the guest checkout to add the shipping address.
The lists of countries are available at admin >> System >> Localization >> Countries in Opencart 4.
To add a new country click the “Add New” blue button and enter the details.
Country Name: Enter the country name.
ISO Code (2): Enter the country code provided at https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
ISO Code (3): Enter the country code provided at https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
Address Format: You can format the address according to your needs and the country. For example, we add the following in the address format field for the “Aaland Islands” country:
First Name = {firstname} Last Name = {lastname} Company = {company} Address 1 = {address_1} Address 2 = {address_2} City = {city} Postcode = {postcode} Zone = {zone} Zone Code = {zone_code} Country = {country}
Now when we select the shipping or billing address country “Aaland Islands” then it will show like the below:
First Name = Rupak Last Name = Nepali Company = Axway Address 1 = 6735 East Greenway Pkwy Address 2 = Apt 2159 City = Scottsdale Postcode = 85254 Zone = Zone Code = Country = Aaland Islands
This way, you can format the shipping and billing addresses as per the country.
Zones or Regions or States management in Opencart
Once we enter the countries we can enter the zones of those countries. For that go to admin >> System >> Localization >>Zones where you can see the lists of zones regions or states.
We can add a new zone as well for that click the “Add New” blue button and you will see a form similar to below:
Zone Name: Enter the zone name
Zone code: You can find the Zone code at https://www.iso.org/obp/ui/#iso:code:3166:NP, search for the country and it will give lists of zones or regions or states and you can see the Zone code.
Country: Select the country the zone is related to.
Status: Enabled it to enable and disabled it to disable.
You can see the country and state mostly at the billing address and shipping address.
In this way, we can manage the countries, zones states, or regions in Opencart 3. Please don’t forget to post your questions or comments so that we can add extra topics. You can follow us at our Twitter account @rupaknpl, subscribe to our YouTube channel for opencart tutorials, and click to see all Opencart user manuals.