Magento Extension: Remove states from Magento

March 16th, 2012 Posted by Public 19 comments on “Magento Extension: Remove states from Magento”

Download this free extension from Magento Connect here:  Remove or Change States and Regions

This extension lets you hide certain states on the front end to prevent customers from selecting them during checkout, estimate shipping, payment, etc. One common issue that many users of Magento (Community and Enterprise) is the list of states (regions for non-US) displayed to customers during checkout, registration and estimate shipping. When Magento is first installed a number of items exist for the United States that are not commonly shipped to or need specific shipping rules.

States commonly excluded from Magento stores:

  • Alaska
  • American Samoa
  • Federated States Of Micronesia
  • Guam
  • Hawaii
  • Marshall Islands
  • Northern Mariana Islands
  • Palau
  • Puerto Rico
  • Virgin Islands

In the case of my medical supplies business we had flat rate shipping to the lower 48 states from our supplier and were charged very high rates to ship to Hawaii, Alaska and other US territories and military locations.  We wanted to handle shipments to these locations offline to ensure we did not lose our shirts on shipping.

One way to achieve this is to modify the collections.php file here (created local version):  /app/code/core/Mage/Directory/Model/Mysql4/Region/Collection.php to alter the regions array returned.  If you like getting into the code and want to redo this update when you upgrade Magento this might work well for you.

There is now a FREE way remove displayed options in shipping and billing in the administrative interface via a new extension.  The “Remove or Change States and Regions” extension is the first extension developed in a joint venture between my company and Eltrino consulting (a team of Magento Rockstars based in Keiv).

State Manager Software Box

Video Demonstration

Instructions for use:

Here is how it works:

  1. Download and install the extension from Magento Connect
  2. Once installed a new menu item appears under “System” > “Configuration” > “Sales” with the title “Region Management”
  3. After selecting “Region Management” the configuration screen is displayed.   Click “New Region Configuration” to add exclusions for a Country (multiple Countries can be configured by adding additional configurations.
  4. Use the “Common Settings” select option to pre-select certain common settings or select specific values based on your needs.  The options here will be modified based on customer requests but to launch we will be providing the following options for the United States:
    • Lower 48 States – Excludes military locations, US territories and Alaska and Hawaii
    • 50 States Only – Excludes military locations and US territories
  5. Save your updates and clear the Magento Cache (System > Cache Management > Flush Magento Cache).
  6. Check your customer website and the excluded options will be removed.

The extension effects the system in the following ways:

  • Excluded States or Regions are removed from all Store Views and Websites
  • Excluded areas are not displayed as options for billing address, shipping address, estimate shipping and customer registration.

For customers who want further flexibility we are going to offer an enhanced version which allows these values to be specified by store/website and for each area (IE – allow Hawaii for registration but not for shipping address).   Please contact me if you are interested in this enhanced version and would like to give input on features and functions.

Download this free extension from Magento Connect here:  Remove or Change States and Regions

The extension is compatible with Community 1.4 – 1.6 and is currently under review for a Trusted Extension for MagentoGo.  The extension is also upgrade proof and will be modified if needed for future Magento versions.

Please let me know what you think in the comments area below.   If you have ideas for additional extensions you would like to see from the NjcMedia & Eltrino partnership please let me know.  We have around 40 extensions in mind which are all coming soon…