Magento:获取表费率的指定国家/地区?

Magento:获取表费率的指定国家/地区?,magento,shipping,Magento,Shipping,是否有办法获取在导入表格费率时指定的国家/地区?我知道如何做到“免费送货”,它是这样做的: $freeShippingCountries = explode(',', Mage::getStoreConfig('carriers/freeshipping/specificcountry', Mage::app()->getStore())); 我尝试过,这对表rates不起作用,它总是返回null。还有别的办法吗 谢谢 实际上不是,tablerates数据存储在单独的表中,您可以尝试以下

是否有办法获取在导入表格费率时指定的国家/地区?我知道如何做到“免费送货”,它是这样做的:

$freeShippingCountries = explode(',', Mage::getStoreConfig('carriers/freeshipping/specificcountry', Mage::app()->getStore()));
我尝试过,这对表rates不起作用,它总是返回null。还有别的办法吗


谢谢

实际上不是,tablerates数据存储在单独的表中,您可以尝试以下方法

    $read = Mage::getSingleton('core/resource')->getConnection('core_read');

    $tableRateData = $read->fetchAll("select * from shipping_tablerate");
或者,如果您只需要在表费率中启用的国家/地区,请使用

    $tableRateData = $read->fetchAll("select distinct dest_country_id from shipping_tablerate");