In todayās Magento 2 tutorial blog, I will justify How to Add New Region for Specific Country in Magento 2.
When a customer creates an account for your Magento 2 store, it is necessary to enter the address so that in the future while placing an order, the customer can use the saved address. Also while tax implementation, the admin requires the customerās region and pin code to apply special rules. Magento 2 maintains the database to allow customers to select their country, state, and region.
If any region is missing or if a new region is added, at that time the developer needs to add a new region of the country in the database. Integrate Magento 2 City and Region Manager Module to add custom shipping regions and show in the store frontend.
For now, letās look at the method to Add New Region For Specific Country in Magento 2.
You need to run the below SQL Query:
Syntax:
INSERT INTO ādirectory_country_regionā (ācountry_idā, ācodeā, ādefault_nameā, āstate_codeā) VALUES ('country id', 'region code', 'region nameā, 'state codeā);
Example 1:
INSERT INTO `directory_country_region` (`country_id`, `code`, `default_name`, `state_code`) VALUES ('US', 'CS', 'Custom State', '45');
Executing the above SQL query will give you the below results
Example 2:
INSERT INTO `directory_country_region` (`country_id`, `code`, `default_name`, `state_code`) VALUES ('IN', 'IS', 'Indian State', '46');
Executing the above SQL query will give you the below results
This way you can easily Add New Region For Specific Country in Magento 2. Dropdown your queries in the comment box. Share the article further and stay connected for more.
Happy Reading!
In the world of business, understanding financial metrics is crucial for making informed decisions and…
Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…
In this era, businesses are always on the lookout for ways to engage with their…
Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…
E-commerce has transformed the way consumers shop for products and services and interact with businesses.…
The e-commerce world is constantly in flux. New tech and strategies emerge daily to help…