Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [country-regions]

The tag has no usage guidance.

0
votes
0answers
9 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
43 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
156 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
44 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
347 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
43 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
37 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
62 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
337 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
0
votes
0answers
47 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
22 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
51 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
54 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/...
1
vote
1answer
119 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
39 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
271 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
997 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
106 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
467 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
358 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
111 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
46 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
661 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
406 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
1k 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
787 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
65 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
2answers
566 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
355 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 ...
0
votes
2answers
5k 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
1answer
1k 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
776 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 ...
2
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 ?
6
votes
1answer
5k 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
200 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
273 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
652 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 ...
9
votes
4answers
13k 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
48 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....
2
votes
1answer
3k views

magento 2 : Get country from IP address

How to get the name of the country from the ip address in magento 2. I think it will require me to use geoip, but I don't know how to do it. Any help?
1
vote
1answer
208 views

How can i add Country Name or flag Display on Ordered page Panel Grid?

I need to show Country Name or flag on ordered page, How can i add custom field on ordered panel grid?
1
vote
0answers
965 views

Magento 2: How to Add Additional Countries?

Apart from Magento Default Country list. I have below Countries which needs to be added. MINE MAGENTO MAPPED ------------------------------------------- Antigua and Barbuda => ...
2
votes
0answers
75 views

synchronization between multiregion Shops

Our main business is in Germany and we try to sell our products in China. At first we used our existing infrastructure in Germany with new a new storeview, but the latency from China was very high. A ...
5
votes
0answers
797 views

How to make country_id/region_id/region to work in custom admin form?

I need country/region fields in custom form in admin panel. I have following fields: <field name="country_id"> <argument name="data" xsi:type="array"> <item ...
2
votes
3answers
2k views

ui_component form state/region field update after country select (M 2.1)

I created form as a ui_component in my module. It has all data which is neccesary -> country list and region/state list. The only problem is the region field doesn`t update on country change. It ...
0
votes
2answers
3k views

Magento 2 - Get country in billing address

I'm trying to get the country name from billing address. I have the address object and I see that the attribute country_id is always No but I'm sure the country is existed as it is displayed properly ...
4
votes
2answers
7k views

Magento 2 - State/Province dropdown and Country Dropdown in Contact form

I need to add these 2 dropdowns to the contact form. How would I pull in those values for each dropdown?
2
votes
1answer
2k views

Show State/Province code in address

When a customer make an order, in the shipping and billing address appears the extended Province name (for example "Lecce"). Is it possible to show the Region code "LE" instead of the Region name "...