从magento签出中删除某些州/省

从magento签出中删除某些州/省,magento,checkout,Magento,Checkout,我想从magento 1.12.0.2签出(onestepcheckout)页面删除某些州/省,如“美属萨摩亚” 我尝试在“/app/code/local/Mage/Directory/”中更改Data.php文件 但没有任何运气,任何帮助都将非常感谢如何做到这一点 提前感谢以上代码运行良好,我只需要刷新Magento缓存存储 public function getRegionJson() { $exclude_regions = array ('AS','FM'

我想从magento 1.12.0.2签出(onestepcheckout)页面删除某些州/省,如“美属萨摩亚” 我尝试在“/app/code/local/Mage/Directory/”中更改Data.php文件

但没有任何运气,任何帮助都将非常感谢如何做到这一点


提前感谢

以上代码运行良好,我只需要刷新Magento缓存存储

    public function getRegionJson()
    {
        $exclude_regions = array ('AS','FM');
        Varien_Profiler::start('TEST: '.__METHOD__);
        if (!$this->_regionJson) 
        {
            $cacheKey = 'DIRECTORY_REGIONS_JSON_STORE'.Mage::app()->getStore()->getId();
            if (Mage::app()->useCache('config')) {
            $json = Mage::app()->loadCache($cacheKey);
        }
        if (empty($json)) 
        {
            $countryIds = array();
            foreach ($this->getCountryCollection() as $country) 
            {
            $countryIds[] = $country->getCountryId();
            }
        $collection = Mage::getModel('directory/region')->getResourceCollection()
        ->addCountryFilter($countryIds)
        ->load();
        $regions = array();
        foreach ($collection as $region) {
        $rg = $region->getCode();
        //if ($rg!='AL'){
        if(!in_array($rg, $exclude_regions)) {
        if (!$region->getRegionId()) {
        continue;
        }
        $regions[$region->getCountryId()][$region->getRegionId()] = array(
        'code' => $region->getCode(),
        //'name' => $region->getName()
        'name' => $this->__($region->getName())
        );
        }
        }
        $json = Mage::helper('core')->jsonEncode($regions);
        if (Mage::app()->useCache('config')) {
        Mage::app()->saveCache($json, $cacheKey, array('config'));
        }
        }
        $this->_regionJson = $json;
        }
        Varien_Profiler::stop('TEST: '.__METHOD__);
        return $this->_regionJson;
    }