How to identify if region_id is required or region (region_name) is required?Received order from a “blocked” countryregion field remains empty in Magento2 customer registrationMagento 2.1.2, Remove “region” from the AddressRemove region from address information in checkoutMagento2 Hide/Show VAT field based on CountryMagento 2.2: How to add country and region drop-downs in a custom step form in one page checkout?Magento 2, address->getRegion() return object instead of stringMagento 2 checkout page how to get country_id from selected shipping addresses?Magento 2 - VAT Number require Validation based on country on Shipping address boxHow to get Region text from address id (Magento 2)
Why did the Herschel Space Telescope need helium coolant?
How can this tool find out registered domains from an IP?
Pre-1972 sci-fi short story or novel: alien(?) tunnel where people try new moves and get destroyed if they're not the correct ones
Should an arbiter claim draw at a K+R vs K+R endgame?
Medieval flying castle propulsion
Why was the Sega Genesis marketed as a 16-bit console?
How Often Do Health Insurance Providers Drop Coverage?
Is the term 'open source' a trademark?
What makes an item an artifact?
What to do when surprise and a high initiative roll conflict with the narrative?
How come the nude protesters were not arrested?
Programming bare microcontroller chips
How can I get an unreasonable manager to approve time off?
How to forge a multi-part weapon?
What makes Ada the language of choice for the ISS's safety-critical systems?
Soft question: Examples where lack of mathematical rigour cause security breaches?
Using "subway" as name for London Underground?
What can I, as a user, do about offensive reviews in App Store?
Is it a problem if <h4>, <h5> and <h6> are smaller than regular text?
Taxi Services at Didcot
Déjà vu, again?
Is a lack of character descriptions a problem?
Where Mongol herds graze
Can U.S. Tax Forms Be Legally HTMLified?
How to identify if region_id is required or region (region_name) is required?
Received order from a “blocked” countryregion field remains empty in Magento2 customer registrationMagento 2.1.2, Remove “region” from the AddressRemove region from address information in checkoutMagento2 Hide/Show VAT field based on CountryMagento 2.2: How to add country and region drop-downs in a custom step form in one page checkout?Magento 2, address->getRegion() return object instead of stringMagento 2 checkout page how to get country_id from selected shipping addresses?Magento 2 - VAT Number require Validation based on country on Shipping address boxHow to get Region text from address id (Magento 2)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I am creating customer address in Magento 2 programatically.
In few countries the region_id
is required, which can be obtained from the model MagentoDirectoryModelRegion
, for example forUS
country and in few countries the region
is required which is a text field, for example for Italy
country.
How to identify if region_id
is required or region
(region_name) is required for the country?
magento2 orders customer-address
add a comment |
I am creating customer address in Magento 2 programatically.
In few countries the region_id
is required, which can be obtained from the model MagentoDirectoryModelRegion
, for example forUS
country and in few countries the region
is required which is a text field, for example for Italy
country.
How to identify if region_id
is required or region
(region_name) is required for the country?
magento2 orders customer-address
You can check the country list under Store->Configuration->General->State Required for.
– Sukumar Gorai
May 30 at 11:44
add a comment |
I am creating customer address in Magento 2 programatically.
In few countries the region_id
is required, which can be obtained from the model MagentoDirectoryModelRegion
, for example forUS
country and in few countries the region
is required which is a text field, for example for Italy
country.
How to identify if region_id
is required or region
(region_name) is required for the country?
magento2 orders customer-address
I am creating customer address in Magento 2 programatically.
In few countries the region_id
is required, which can be obtained from the model MagentoDirectoryModelRegion
, for example forUS
country and in few countries the region
is required which is a text field, for example for Italy
country.
How to identify if region_id
is required or region
(region_name) is required for the country?
magento2 orders customer-address
magento2 orders customer-address
edited May 30 at 11:11
Dhara Bhatti
427112
427112
asked May 30 at 11:01
Milind SinghMilind Singh
778215
778215
You can check the country list under Store->Configuration->General->State Required for.
– Sukumar Gorai
May 30 at 11:44
add a comment |
You can check the country list under Store->Configuration->General->State Required for.
– Sukumar Gorai
May 30 at 11:44
You can check the country list under Store->Configuration->General->State Required for.
– Sukumar Gorai
May 30 at 11:44
You can check the country list under Store->Configuration->General->State Required for.
– Sukumar Gorai
May 30 at 11:44
add a comment |
1 Answer
1
active
oldest
votes
I have a suggestion for you. Take a look at MagentoDirectoryHelperData
public function getRegionData()
.....
return $regions;
This function will return the list of countries which have the regions are required.
You should build your own logic.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f276722%2fhow-to-identify-if-region-id-is-required-or-region-region-name-is-required%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
I have a suggestion for you. Take a look at MagentoDirectoryHelperData
public function getRegionData()
.....
return $regions;
This function will return the list of countries which have the regions are required.
You should build your own logic.
add a comment |
I have a suggestion for you. Take a look at MagentoDirectoryHelperData
public function getRegionData()
.....
return $regions;
This function will return the list of countries which have the regions are required.
You should build your own logic.
add a comment |
I have a suggestion for you. Take a look at MagentoDirectoryHelperData
public function getRegionData()
.....
return $regions;
This function will return the list of countries which have the regions are required.
You should build your own logic.
I have a suggestion for you. Take a look at MagentoDirectoryHelperData
public function getRegionData()
.....
return $regions;
This function will return the list of countries which have the regions are required.
You should build your own logic.
answered May 30 at 11:44
Khoa TruongDinhKhoa TruongDinh
22.5k64491
22.5k64491
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f276722%2fhow-to-identify-if-region-id-is-required-or-region-region-name-is-required%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You can check the country list under Store->Configuration->General->State Required for.
– Sukumar Gorai
May 30 at 11:44