I've created a new installation with Magento for a client of mine. But here is the problem, all the country dropdown options are not sorted ASC. For example, if I choose a country on the checkout page this will show all the countries but not in correct order.

eg: Taiwan Belgium United States Angora

I hope someone is able to help me with this question, thank you in advance :).

Best regards, Myron


Create your own module (if it's not exist yet). Rewrite Mage_Directory_Model_Resource_Country_Collection class:


Create the following file in your Magento root dir:


with the following content:


class Your_Module_Model_Resource_Directory_Country_Collection
    extends Mage_Directory_Model_Resource_Country_Collection

    protected function _initSelect()

            ->addOrder('country_id', 'asc');

        return $this;

Reference: https://stackoverflow.com/questions/4473880/magento-country-reorder

|improve this answer|||||
  • Hi Shoaib, Thanks for your answer, i did this and found out that the _initSelect() didn't work anymore so i combined 2 answers from the referenced post you've added to make it work! Thanks!!! – Myron May 22 '19 at 8:33
  • That's great. welcome.. +1 for appreciation :) – Shoaib Munir May 22 '19 at 8:34

I will try this and update with the outcome. Alternatively, Shoaib apna koi contact ka tareeka bata do. I have a project that I would like to discuss.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.