[Skip to main content](#vessel-content)

#   States Sort

##

- **[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")**
- [![khashiz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/61259-khashiz "View khashiz's Profile") Topic Author
- [ Offline](/forum/user/61259-khashiz)

Less More

- Posts: 240
- Thank you received: 13
-
-

4 years 9 months ago [\#339746](#339746) by [khashiz](/forum/user/61259-khashiz "View khashiz's Profile")  *[States Sort](/forum/27-checkout/904038-states-sort#339746 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 4.1.0 -- PHP version -- : 7.4  Hi. In checkout address section, States dripdown is showing states in alphabetical order. I want states to be displayed with the ordering that I entered them in admin.  How can I do that ?")* was created by *[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")*

-- HikaShop version -- : 4.5.0
-- Joomla version -- : 4.1.0
-- PHP version -- : 7.4

Hi.
In checkout address section, States dripdown is showing states in alphabetical order.
I want states to be displayed with the ordering that I entered them in admin.

How can I do that ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNDAzOC1zdGF0ZXMtc29ydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14327
-
-

4 years 9 months ago [\#339761](#339761) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[States Sort](/forum/27-checkout/904038-states-sort#339761 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 4.1.0 -- PHP version -- : 7.4  Hi. In checkout address section, States dripdown is showing states in alphabetical order. I want states to be displayed with the ordering that I entered them in admin.  How can I do that ?")*

Hi,

Supposing that you're talking about only the states of a particular country, what you can do is this:
If you edit your states via the System&gt;Zones menu, you can see the fields "name" and "name in english"
The sorting is based on the "name in english" field. and if that field contains a number, it won't be displayed and only the "name" will appear in the dropdown. So the solution is to enter the position number of each state in the "name in english" field and the name you want to appear in the dropdown in the "name" field.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNDAzOC1zdGF0ZXMtc29ydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")**
- [![khashiz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/61259-khashiz "View khashiz's Profile") Topic Author
- [ Offline](/forum/user/61259-khashiz)

Less More

- Posts: 240
- Thank you received: 13
-
-

4 years 8 months ago [\#339870](#339870) by [khashiz](/forum/user/61259-khashiz "View khashiz's Profile")  Replied by *[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")* on topic *[States Sort](/forum/27-checkout/904038-states-sort#339870 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 4.1.0 -- PHP version -- : 7.4  Hi. In checkout address section, States dripdown is showing states in alphabetical order. I want states to be displayed with the ordering that I entered them in admin.  How can I do that ?")*

Its not just about a specific country ... I want to change the sort for all countries as I entered in admin

I tried to edit the name in english but it is showing in dropdown

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNDAzOC1zdGF0ZXMtc29ydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86587
- Thank you received: 14327
-
-

4 years 8 months ago [\#339872](#339872) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[States Sort](/forum/27-checkout/904038-states-sort#339872 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 4.1.0 -- PHP version -- : 7.4  Hi. In checkout address section, States dripdown is showing states in alphabetical order. I want states to be displayed with the ordering that I entered them in admin.  How can I do that ?")*

Hi,

Well, I don't have a nice alternative.
What I can propose is to directly change the line:
$query .= ' WHERE '.implode(' AND ',$filters).' ORDER BY a.zone_name_english ASC';
in the file administrator/components/com_hikashop/types/country.php
to load the zones differently. For example, you could change it to:
$query .= ' WHERE '.implode(' AND ',$filters).' ORDER BY a.zone_id ASC';
which would sort the states (and countries) in the order they were added to the database.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNDAzOC1zdGF0ZXMtc29ydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")**
- [![khashiz's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/61259-khashiz "View khashiz's Profile") Topic Author
- [ Offline](/forum/user/61259-khashiz)

Less More

- Posts: 240
- Thank you received: 13
-
-

4 years 8 months ago [\#339878](#339878) by [khashiz](/forum/user/61259-khashiz "View khashiz's Profile")  Replied by *[khashiz](/forum/user/61259-khashiz "View khashiz's Profile")* on topic *[States Sort](/forum/27-checkout/904038-states-sort#339878 "-- HikaShop version -- : 4.5.0 -- Joomla version -- : 4.1.0 -- PHP version -- : 7.4  Hi. In checkout address section, States dripdown is showing states in alphabetical order. I want states to be displayed with the ordering that I entered them in admin.  How can I do that ?")*

thank you

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0LzkwNDAzOC1zdGF0ZXMtc29ydD90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.078 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
