Add code

Saturday, 26 December 2015

Adding the list of states in India to Magento

I have tested this and worked for me on my server : 

INSERT INTO `directory_country_region` VALUES
(NULL , "IN", "Andaman and Nicobar","Andaman and Nicobar"),
(NULL , "IN", "Andhra Pradesh","Andhra Pradesh"),
(NULL , "IN", "Arunachal Pradesh","Arunachal Pradesh"),
(NULL , "IN", "Assam","Assam"),
(NULL , "IN", "Bihar","Bihar"),
(NULL , "IN", "Chandigarh","Chandigarh"),
(NULL , "IN", "Chhattisgarh","Chhattisgarh"),
(NULL , "IN", "Dadra and Nagar Haveli","Dadra and Nagar Haveli"),
(NULL , "IN", "Daman and Diu","Daman and Diu"),
(NULL , "IN", "Delhi","Delhi"),
(NULL , "IN", "Goa","Goa"),
(NULL , "IN", "Gujarat","Gujarat"),
(NULL , "IN", "Haryana","Haryana"),
(NULL , "IN", "Himachal Pradesh","Himachal Pradesh"),
(NULL , "IN", "Jammu and Kashmir","Jammu and Kashmir"),
(NULL , "IN", "Jharkhand","Jharkhand"),
(NULL , "IN", "Karnataka","Karnataka"),
(NULL , "IN", "Kerala","Kerala"),
(NULL , "IN", "Lakshadweep","Lakshadweep"),
(NULL , "IN", "Madhya Pradesh","Madhya Pradesh"),
(NULL , "IN", "Maharashtra","Maharashtra"),
(NULL , "IN", "Manipur","Manipur"),
(NULL , "IN", "Meghalaya","Meghalaya"),
(NULL , "IN", "Mizoram","Mizoram"),
(NULL , "IN", "Nagaland","Nagaland"),
(NULL , "IN", "Orissa","Orissa"),
(NULL , "IN", "Pondicherry","Pondicherry"),
(NULL , "IN", "Punjab","Punjab"),
(NULL , "IN", "Rajasthan","Rajasthan"),
(NULL , "IN", "Sikkim","Sikkim"),
(NULL , "IN", "Tamil Nadu","Tamil Nadu"),
(NULL , "IN", "Tripura","Tripura"),
(NULL , "IN", "Uttar Pradesh","Uttar Pradesh"),
(NULL , "IN", "Uttaranchal","Uttaranchal"),
(NULL , "IN", "West Bengal","West Bengal");
  
INSERT INTO `directory_country_region_name` (`locale` ,`region_id` ,`name` )
    SELECT 'en_US', tmp.region_id, tmp.default_name FROM `directory_country_region`
        AS tmp WHERE tmp.country_id='IN';

5 comments:

  1. Thanks for the comment. Please contact me for any type of help in magento. Sure I will try to help if i can dear.

    ReplyDelete
  2. Thank you very much dear, for puting this solution.

    Please let me know your mobile number or email Id, so for future help I can contact you. thanks

    ReplyDelete
    Replies
    1. Hello,

      teja.bhagavan1@gmail.com is my email id

      Thanks

      Delete
  3. Its really good blog and very information, we are tempo traveller rental company in Ghaziabad providing tempo traveller in Ghaziabad for local and outstation, we have luxury tempo traveller in Ghaziabad you can rent 12 seater, 17 seater , 20 seater , 26 seater Tempo traveller Ghaziabad to outstation tours ~ JBL Tempo Traveller Rentals Delhi NCR ~ 9560075009
    Our location : Flat No : 1304, Sector 16A, Vasundhara, Ghaziabad, Uttar Pradesh 201012

    ReplyDelete

How to increase Magento 2 website speed?

  Step 1 : First, Optimize your Server and the System Requirements Step 2: Update your Magento 2 to the latest version of Magento 2 Step 3 ...