Jump to content

add all the USA state to prestashop


Recommended Posts

by default, the prestashop provide the USA state, but several is missed,
below is the full list of USA state. the black font state is which not in the default prestashop.

delete from ps_state;
INSERT INTO `ps_state` (`id_state`, `id_country`, `id_zone`, `name`, `iso_code`, `tax_behavior`, `active`) VALUES
(1, 21, 6, 'Alabama', 'AL', 0, 1),
(2, 21, 6, 'Alaska', 'AK', 0, 1),
(3, 21, 6, 'Arizona', 'AZ', 0, 1),
(4, 21, 6, 'Arkansas', 'AR', 0, 1),
(5, 21, 6, 'California', 'CA', 0, 1),
(6, 21, 6, 'Colorado', 'CO', 0, 1),
(7, 21, 6, 'Connecticut', 'CT', 0, 1),
(8, 21, 6, 'Delaware', 'DE', 0, 1),
(9, 21, 6, 'Florida', 'FL', 0, 1),
(10, 21, 6, 'Georgia', 'GA', 0, 1),
(11, 21, 6, 'Hawaii', 'HI', 0, 1),
(12, 21, 6, 'Idaho', 'ID', 0, 1),
(13, 21, 6, 'Illinois', 'IL', 0, 1),
(14, 21, 6, 'Indiana', 'IN', 0, 1),
(15, 21, 6, 'Iowa', 'IA', 0, 1),
(16, 21, 6, 'Kansas', 'KS', 0, 1),
(17, 21, 6, 'Kentucky', 'KY', 0, 1),
(18, 21, 6, 'Louisiana', 'LA', 0, 1),
(19, 21, 6, 'Maine', 'ME', 0, 1),
(20, 21, 6, 'Maryland', 'MD', 0, 1),
(21, 21, 6, 'Massachusetts', 'MA', 0, 1),
(22, 21, 6, 'Michigan', 'MI', 0, 1),
(23, 21, 6, 'Minnesota', 'MN', 0, 1),
(24, 21, 6, 'Mississippi', 'MS', 0, 1),
(25, 21, 6, 'Missouri', 'MO', 0, 1),
(26, 21, 6, 'Montana', 'MT', 0, 1),
(27, 21, 6, 'Nebraska', 'NE', 0, 1),
(28, 21, 6, 'Nevada', 'NV', 0, 1),
(29, 21, 6, 'New Hampshire', 'NH', 0, 1),
(30, 21, 6, 'New Jersey', 'NJ', 0, 1),
(31, 21, 6, 'New Mexico', 'NM', 0, 1),
(32, 21, 6, 'New York', 'NY', 0, 1),
(33, 21, 6, 'North Carolina', 'NC', 0, 1),
(34, 21, 6, 'North Dakota', 'ND', 0, 1),
(35, 21, 6, 'Ohio', 'OH', 0, 1),
(36, 21, 6, 'Oklahoma', 'OK', 0, 1),
(37, 21, 6, 'Oregon', 'OR', 0, 1),
(38, 21, 6, 'Pennsylvania', 'PA', 0, 1),
(39, 21, 6, 'Rhode Island', 'RI', 0, 1),
(40, 21, 6, 'South Carolina', 'SC', 0, 1),
(41, 21, 6, 'South Dakota', 'SD', 0, 1),
(42, 21, 6, 'Tennessee', 'TN', 0, 1),
(43, 21, 6, 'Texas', 'TX', 0, 1),
(44, 21, 6, 'Utah', 'UT', 0, 1),
(45, 21, 6, 'Vermont', 'VT', 0, 1),
(46, 21, 6, 'Virginia', 'VA', 0, 1),
(47, 21, 6, 'Washington', 'WA', 0, 1),
(48, 21, 6, 'West Virginia', 'WV', 0, 1),
(49, 21, 6, 'Wisconsin', 'WI', 0, 1),
(50, 21, 6, 'Wyoming', 'WY', 0, 1),
(51, 21, 6, 'Puerto Rico', 'PR', 0, 1),
(52, 21, 6, 'United States Virgin Islands', 'VI', 0, 1),
(53, 21, 6, 'American Samoa', 'AS', 0, 1),
(54, 21, 6, 'District of Columbia', 'DC', 0, 1),
(55, 21, 6, 'Guam', 'GU', 0, 1),
(56, 21, 6, 'Northern Mariana Islands', 'MP', 0, 1),
(57, 21, 6, 'Armed Forces Africa', 'AE', 0, 1),
(58, 21, 6, 'Armed Forces Americas', 'AA', 0, 1),
(59, 21, 6, 'Armed Forces Canada', 'AA', 0, 1),
(60, 21, 6, 'Armed Forces Europe', 'AE', 0, 1),
(61, 21, 6, 'Armed Forces Middle East', 'AE', 0, 1),
(62, 21, 6, 'Armed Forces Pacific', 'AP', 0, 1);

Link to comment
Share on other sites

  • 4 years later...

It is really rather shocking that Googling "prestashop armed forces" only really brings up this one thread, that got NO replies.  Since 2011!

 

how is it possible that a front-runner ecommerce platform is completely ignoring the US Armed Forces?  And they leave it up to a user to post a [incorrect] solution?  It may have been correct in 2011, I have no idea, but running that code now will clober out some Mexican "states".  That table auto-increments so there's no need to include that first column.

 

But really PS.. fix this!  Include the world's largest ecommerce shopping country's complete set of states!

 

Just noticed the above list is incorrect on another front... there is no "Armed Forces Canada" (not to be confused with the Canadian Armed Forces) from an addressing perspective, nor is there Middle East.  There is only:

 

 

 

  • AA, Armed Forces Americas, which serves all of the Americas, (including military bases within the United States), except for Canada;
  • AE, Armed Forces Europe, which serves Europe, Canada, Africa and the Middle East;
  • AP, Armed Forces Pacific, which serves Asia and the Pacific.

 

As well the list leaves out one more:

 

  • UM, United States Minor Outlying Islands

 

I'm not American, and I certainly noticed.  It makes me wonder just how incomplete the list is for other countries that I'm less familiar with!  Yikes.

 

Someone explain to me how this isn't a big deal.  What did I miss?

Edited by bcsteeve (see edit history)
Link to comment
Share on other sites

Weird... OK, I now see that some of these are already included as "countries", like AS and FM.  Oddly enough, Prestacart has Puerto Rico listed both as a country and a state.

 

From the perspective of mail delivery, it is a state.  All of them are treated as such.  Not countries.

Link to comment
Share on other sites

  • 3 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...