Questions tagged [regions]
The regions tag has no summary.
20 questions
0 votes
1 answer
366 views
Magento2.4: How to get Region name by Zip code?
I need to get the region name based on ZIP/Postal code. My code is below but its not working. Can anyone please help to get the region name by zip code? $postcode = "560100"; $...
1 vote
1 answer
1k views
magento 2.4 save region as string in address
I'm importing my customers via code and part of that import involves addresses and regions. If the region is in the database, I have no issue in importing it, I simply get the region id by the region ...
0 votes
1 answer
124 views
Please enter a valid region error for regions with special characters
I'm trying to import customer addresses. If the region has a name with accents, Magento v2.3.6 won't recognize it. Example: Country code 'RO', region 'Timiș' - doesn't work Country code 'RO', region '...
0 votes
1 answer
305 views
How to compare value inside array in magento 2 join query?
$this->getSelect()->join( ["address" => "sales_order_address"], 'main_table.entity_id = address.parent_id AND address.address_type = "shipping"', array('region') )->joinLeft( ["so" => "...
0 votes
1 answer
500 views
Magento 2 Update Ragion/State in Database
I found some regions in a specific countries are obsolete and new ones are missing. I know how to add region by installData.php in a custom module but i dont know how to remove the obsolete ones. ...
0 votes
1 answer
388 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'); ...
0 votes
2 answers
309 views
How to get all state code in magento 2.1.7?
I am passing the parameters as 'recipientstate' => $customer['region'] and 'cardholderstate' => $customerbilling['region'] Right now I am getting the region value's as ARIZONA , but I want it ...
4 votes
2 answers
4k views
How to get Region text from address id (Magento 2)
I am not able to get region text from address id, <?php $_pAddsses = $block->getDefaultBilling() ?> <?php echo $block->getAddressById($_pAddsses)->getRegionId() ?> // ...
5 votes
1 answer
4k views
region Id error on updating address using address Id in magneto2
I followed below link to update address using address id Update customer address using address id in magento 2 I am getting this error upon executing this code protected $addressRepository; public ...
0 votes
1 answer
1k views
How to display regions list sorted by region_id
Thank you for making your attention to my question. I'd like to show Region List ordered by region_id on the DB with RegionUpdater. Currently its ordered by Region's name alphabet. I tried to ...
0 votes
2 answers
883 views
Magento 2 : How to Disable/Enable Custom Shipping Method Based on State / Region
I want to show my custom shipping method based on state/region.
0 votes
2 answers
1k views
How to set default value to region(state) in checkout page magento 2.1..?
I need to set a default value for the region(state) in the checkout page. tried it using jQuery. it's showing the value the field but it's not saving. require([ 'jquery', 'jquery/ui'], function($){ ...
1 vote
0 answers
558 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('#...
2 votes
1 answer
3k 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 "...
1 vote
1 answer
370 views
Register customer region to State/Province table
I'm fairly new to Magento and I'm not quite sure how to add a State/Province field to the register.phtml form. I read somewhere that it's not a good idea to edit this file since it gets wiped whenever ...