Extension that allows you to disable specific region/state for US


Here is little extension called Inchoo_USDisableRegions.
If you have any reason to disable some specific regions from US country, but you don’t want to delete them, this extension will allow you to chose which ones are possible to use for your customer’s addresses.
You can get it here: https://github.com/tomasinchoo/Inchoo_USDisableRegions/tags

Extension is tested only on Magento ver.

Keep in mind that this extension is created for purposes of blog article at inchoo.net and as such can only be used as proof of concept.

If you find it helpful in order to learn Magento, that is great, but be careful if you plan to use it in production environment.

So, that’s it, just install extension and go to System->Configuration->General->Enabled Regions and chose ones you would like to use.

Please note that this works only for United States regions.

Let me know if you have any additional questions 😉

About Tomas Novoselic

Team Leader/Backend Developer

At Inchoo, Tomas is a Team Leader and Certified Magento Developer who handles Magento modifications at any level. He also works closely with clients on Magento projects of any size and difficulty.

Read more posts by Tomas / Visit Tomas's profile


  1. Please replace $allowedCountries[] with $allowedRegions[] in line 41 of

    and it will work. It is working fine in CE 1.9.1 as well

  2. Made a couple of modifications to this module and am happy with it now.

    1. For Inchoo_USDisableRegions_Model_Adminhtml_System_Config_Source_Region store the region code as the value, not the name
    2. In Inchoo_USDisableRegions_Model_Resource_Region_Collection, instead of calling addRegionNameFilter(), call addRegionCodeFilter()
    3. In Inchoo_USDisableRegions_Model_Resource_Region_Collection comment out the if isAdmin() stuff, and instead apply the filter as long as ‘adminhtml_system_config_edit’ is not in the list of active layout handles (or we will filter the full state list that we need)
    4. In Inchoo_USDisableRegions_Model_Resource_Region_Collection do not pass $allowedRegions into the region filter, instead, create a proper array of codes/names and pass that in instead.

  3. Inchoo_USDisableRegions_Model_Adminhtml_System_Config_Source_Region

    In the foreach block, the array that is loaded with results is $allowedCountries but it should be $allowedRegions.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <blockquote cite=""> <code> <del datetime=""> <em> <s> <strike> <strong>. You may use following syntax for source code: <pre><code>$current = "Inchoo";</code></pre>.