Questions tagged [country-regions]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
0answers
31 views

How to set restrictions for specific states in Magento 2?

How to restrict user on checkout page, If user select value of State like Alaska or Hawaii it should throw an error.
0
votes
0answers
19 views

Mangeto2.3.0 How to add country drop-down with tool-tip help in billing-address form?

I am using Mangeto2.3.0 i need to add tooltip help "?" define with county filed. I am trying to vendor module-checkout inside layoutprocessor.php override but not working on it.if anyone idea reply me ...
0
votes
0answers
17 views

Magento 2: Is region_id for country/states get changes for Magento versions or in others modes?

2.3.1 Enterprise Edition. Am little bit confused for future usage of Country and Regions for form XML? here am getting the only region_id during form submit. am not able to get the code name of ...
0
votes
0answers
12 views

Magento 2: How to apply custom or dynamic TAX while entered VAT number is invalid for European countries?

I have tried to apply Tax for European country while customer entered invalid Vat Number but it's not working at all. Default Magento gives functionality for VAT validation and after that its change ...
0
votes
0answers
27 views

Magento 2 How to show selected countries in Add Billing Address Form?

I had enabled some countries from Magento2 Admin Panel: In Whole Website, only selected countries is showing in country dropdown but in Add Billing/Shipping Address Form all countries are showing: I ...
0
votes
2answers
30 views

Magento 2 How to add country and state dropdown in admin form? [duplicate]

I need to add Country and State Dropdown in Magento 2 admin form. Please help me.
0
votes
1answer
60 views

Magento 2 How to add all country regions in database?

I checked directory_country_region in the database there is no region of the United Kingdom, I need all region of United Kingdom. Is Magento provide the sheet of all country regions or from where I ...
0
votes
1answer
29 views

magento 2: how to display region name in dropdown

Hi to all I added Italian region name in magento db by SQL in directory_country_region as follows: INSERT INTO directory_country_region(country_id, code, default_name) VALUES ('IT', 'TO', 'Torino'); ...
1
vote
1answer
176 views

Magento 2: Update Region/States dropdown for Specific Country

I want to add only Nigeria as the option in Country Dropdown, and the nigerian states in the states/province dropdown. How to do that. I tried something through Admin panel, when i found these issues ...
0
votes
0answers
14 views

How to Write the Condition Virtual Products only for selected countries?

How to write condition like Virtual Products only available for Selected Countries. Apart from selected countries Virtual products not eligible to place an Order.
0
votes
1answer
106 views

Add Country field in custom Checkout form in Magento2

I added new step on checkout and I created a form for this new step. How can I add Magento built-in Country drop down field and state/province drop down field to my custom checkout form?
0
votes
0answers
243 views

Magento2 How to add country and state drop down in customer account information tab and display state based on country selected in admin

I need to integrate country and state fields for customers, I created them and listed successfully in frontend registration and profile. When working with admin I can see the two fields but the ...
1
vote
0answers
63 views

How to show state dropdown in phtml file in magento2

I want to show state drop down in phtml file in magento2 I have a country code <?php $countryBlock = $block->getLayout()- >createBlock('Magento\Directory\Block\Data');?> &...
1
vote
2answers
902 views

Magento 2 - Get country name from country code

I want to get country name from country code, in Magento 1.9 I use the code like this to get country name: $countryCollection = Mage::getModel('directory/country_api')->items(); foreach($...
1
vote
2answers
173 views

Magento2: How to Modify DropDown Country options on the fly?

I need to create a restriction for the Billing [Country_Id] options Based on a new Config. Setting that Pairs a Customer-Segment with specific Billing Country options. I found: vendor/magento/...
0
votes
0answers
53 views

How to redirect my website as country wise in magento2

Hello i have multiple store for my site,like us and uk when some one from US visit my site it will directly redirect to ex: www.demo.com/us store same for uk how to do in magento2
3
votes
1answer
182 views

Magento 2 State Option

Our client wants us to make the state field as an optional one in the Checkout. In order to do this, we have removed all the countries from the required state option and set to "Yes" for allowing to ...
0
votes
2answers
753 views

How to get the country code based on country id in magento 2

I wish to get the country code based on country id in checkout page . I have the country id, How do i pass it to get country code in magento 2
1
vote
0answers
87 views

Same content (language) for multiple countries (store views)

I'm trying to implement an e-commerce site (using Magento 2) that has the following requirements: be available in N countries (eg http://example.com/country_code/ ) with X languages share the same ...
0
votes
1answer
23 views

Mage 1.9.2.4 1: 1 website, 1 catalog, multiprice, multicurrency

I read many many answers. Many have similar questions, but at the end the solution seems to me to build many websites. My need: Magento 1.9.2.4 to implement 1 website (eg brand.com) with 1 catalog of ...
2
votes
0answers
79 views

Magento 2 Region list not filter for default country on billing address for first time

There are many country region available in region list. The issue arises first-time page load on the billing address of checkout. Even default country has been set up the USA, All region list has been ...
2
votes
0answers
82 views

Changing country name (Ireland to be Republic of Ireland) in Magento 2

I need to change Ireland to the Republic of Ireland. No matter what I change and clear the caches it does not update I have tried editing vendor/magento/zendframework1/library/Zend/Locale/Data/...
2
votes
1answer
195 views

Can't checkout when remove country field

I tried to hide the country field in the checkout page and billing page. Here's my code : <item name="region_id" xsi:type="array"> <item name="visible" xsi:type="boolean">false</...
2
votes
1answer
45 views

Adding new regions won't persist

I followed an example and created a custom extension that would add some regions to the directory_country_region & directory_country_region_name tables. I want to make sure that the data I write ...
6
votes
1answer
344 views

How to validate postal code by country id?

In Magento checkout there is a postal code verification for each country, now I want to implement it in different module for different case, how to do it if I already have the country id and postal ...
4
votes
1answer
2k views

Shipping Error. Invalid value in Region ID field

Just testing my shipping for a logged-in customer on Magento 2.2.5 When I come to the checkout I get the following error. Please check the shipping address information. Invalid value of "183" ...
0
votes
1answer
124 views

Magento list states and cities according to website specific for India

How to list states and cities according to website specific for India
0
votes
0answers
775 views

Region id is required field error

In my account page after fillup all form fields, getting an error "regionid is required field" but I can't find out actual reason why this error comes every time. if anyone has idea please reply me.
0
votes
1answer
513 views

Magento 2.2.4 Change Country Names

I am wanting to change the names in English for countries in Magento 2.2.4. I tried looking through the database but it appears their full name is not listed there, just country codes. For my use of ...
0
votes
1answer
154 views

How can I set the minimum order amount from a certain country

I see how I can set the minimum order for all customers, but how can I do this for customers for a certain country, for example France? In the promotions tab I can set a promotion for a certain ...
0
votes
1answer
50 views

i want change language according to access point

hi i want to change language according to country visitors means if any user access my website in us than price show in dollar and another access in india than price shows in INR. please help me how ...
1
vote
2answers
985 views

Updating country name in magento 2

I need to change the name of country in magento store e.g. United Kingdom needs to be changed to Great Britain. How can I achieve this? I tried looking at the following tables ...
0
votes
1answer
480 views

How to override country drop-down in checkout page magento 2?

I want to override country drop-down in custom checkout page. In further i want to add my custom function on change of country drop-down.
1
vote
1answer
2k views

How to add new country in country dropdown in magento2.2.1

I want to add new country and its region in magento2.2.1 so it can be shown throughout the site(including backend countried dropdown, checkout at frontend). I have tried this link of magento1 but did ...
1
vote
1answer
1k views

How to load shipping methods on country and postcode change?

I have written a custom shipping module, then I want to change custom shipping methods when country and post code changes. I heard there is a method call js mixin. any one have idea about it, need ...
1
vote
1answer
77 views

My country is missing from the Countries Options in merchant location dropdown menu

I am looking for "Jordan" as the merchant location in the Countries Options dropdown list, but it is not there! It was in My previous version of 1.8 Any ideas on how to add it? Is this related to ...
0
votes
3answers
737 views

Get the country code of website user

I want to get the country code of my website user so that I can show and hide some blocks in my code. How may I do that. For example if some one is browsing our website from Australia I should get AU. ...
0
votes
1answer
387 views

Magento 2 : How to Use County and Region dropdown in custom module

I have a simple question about handling Country and Region dropdowns in admin form. Do I need to create two EAV attributes for region and region_id and put dropdown value in region_id and custom ...
2
votes
3answers
6k views

Get Region Id given Region Code and country id

I need to get the region_id given the region_code and the country_id, but I cannot manage to achieve it. I've tried using the countryFactory and the regionFactory, but i do not understand what i'm ...
1
vote
2answers
2k views

Onchange event in while country change in magento 2

I need to change city field as a select field while change country name as India. otherwise, it shows text field. I follow this link use @Idham Choudry answer, but its throw Uncaught TypeError: ...
7
votes
2answers
882 views

Allow single county gives empty drop down options in front-end checkout Country field in Magento 2

We have configured Allow Countries to Canada in admin. On fronted, by default the checkout page country field is loading with Canada, but if we click on country drop down, empty drop-down fields are ...
3
votes
2answers
2k views

Limit country drop down input field Magento 2

Currently my magento store shows all the country in shipping, billing, and register customer form. is there a way to show only some countries that i want ?
7
votes
1answer
6k views

Magento2 How to get region name by id?

Like in magento1 is is there any method to retrive region name by id. $regionModel = Mage::getModel('directory/region')->load('region_id'); $region = $regionModel->getName(); I checked ...
3
votes
1answer
5k views

Magento2: How I can display country and region drop down fields to admin form in Magento2

I am developing a custom admin module. I have displayed country and region in admin custom module. It is working when I add country and region. But it is not working with edit action. How I can show ...
2
votes
0answers
212 views

Adding custom attributes to states and a dropdown to cities

I would like to change the way the users enter addresses, and I have several doubts about the best way to do it. First, I need to add a drop down for states/provinces to other countries, for what I'...
1
vote
0answers
290 views

How to use region updater in magento 2 custom module?

I am working on the region updater in magento 2. Region Field needs to change based on the selection of country. Below is my region updater code: var billingRegionUpdater = new RegionUpdater('#...
3
votes
1answer
715 views

Remove region from address information in checkout

How can I remove the region (code is <!-- ko text: address().region -->) from the address field, if customer is logged in (see screenshot). I have already removed {region} from the customer ...
0
votes
1answer
2k views

Allowed Countries

We are a New Zealand based website and we offer shipping to New Zealand only. Could someone please clarify what is the option General > Country Options > Allowed Countries do? Also I only want the ...
10
votes
4answers
15k views

How to Get country name from country code in Magento 2?

i want to get country name from country code, i got the country code from the data order like this : $data = $order->getShippingAddress()->getData(); $countryCode = $data['country_id']; echo $...
1
vote
0answers
49 views

Module productive minds SiteSwitcher and changing countries

I have this module currently installed and when i use the top drop down Change Language it switches to the correct store utilizing the correct language and currency. No problem here, see picture below....