I'm trying to limit the states that show in the dropdown in the store. I thought that overriding the _initSelect() method in the app/code/core/Mage/Directory/Model/Resource/Region/Collection.php would help do the trick. Unfortunately, while the change works when applied to the original file, it doesn't work in the override.
Here's the relevant line in my config.xml:
<global>
<models>
<directory>
<rewrite>
<resource_region_collection>
Test_Test_Model_Directory_Resource_Region_Collection
</resource_region_collection>
</rewrite>
</directory>
</models>
</global>
Here's my version of the file in app/code/local/Test/Test/Model/Directory/Resource/Region/Collection.php:
<?php
class Test_Test_Model_Directory_Resource_Region_Collection extends Mage_Directory_Model_Resource_Region_Collection
{
protected function _initSelect()
{
parent::_initSelect();
$excludeRegions = array ('AS','AF','AA','AC','AE','AM','AP','FM','GU','MH','MP','PW','VI');
$this->getSelect()->where('code NOT IN (?)', $excludeRegions);
return $this;
}
}
The "Test" module is working for other Magento overrides I have running, but for some reason isn't working for this one in particular. Any thoughts or suggestions would be awesome, thanks!