Jump to content

Change order of states


Recommended Posts

I noticed, like somebody else who has posted here, that the District of Columbia is not listed as a state. I've added it myself but it is at the bottom of the list. Does anyone know how to get it into alphabetical order and save it? I've used the arrows to get the list into order but as soon as I navigate away from the page this order is lost.
Thanks.

Link to comment
Share on other sites

  • 4 months later...

I edited it directly in the database using PHPMyAdmin. First I exported the table `ps_state` to a .sql file and created a copy. Edited the copy to put District of Columbia in order. Then I emptied the table `ps_state` and replaced the data:

--
-- Dumping data for table `ps_state`
--

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



Note: only the last item in your list should end with a semicolon.

Link to comment
Share on other sites

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...