我有谁拥有三家船区客户端: - 英国 - 欧洲 - 世界如何在Magento创建统一费率发货区?
运输的每个产品的成本会自动计算出一个统一费率的基础上,客户落入三选一区域。这在Magento中可能吗?
Rich
我有谁拥有三家船区客户端: - 英国 - 欧洲 - 世界如何在Magento创建统一费率发货区?
运输的每个产品的成本会自动计算出一个统一费率的基础上,客户落入三选一区域。这在Magento中可能吗?
Rich
您可以尝试Webshopapps Matrixrate扩展。它有很多方法可以自定义工作台运输。
创建一个新模块。从Mage_Shipping_Model_Carrier_Abstract
创建一个新的模型类继承,FX
class MyCompany_MyModule_Model_Flatrate extends Mage_Shipping_Model_Carrier_Abstract
{
protected $_code = 'mycompany_flatrate'; // some unique shipping code
public function collectRates(Mage_Shipping_Model_Rate_Request $data)
{
if(!$this->isActive())
return false;
/* @var $method Mage_Shipping_Model_Rate_Result_Method */
/* @var $result Mage_Shipping_Model_Rate_Result */
$method = Mage::getModel('shipping/rate_result_method');
$result = Mage::getModel('shipping/rate_result');
$method->setCarrier($this->_code);
$method->setCarrierTitle($this->getConfigData('name'));
$method->setMethod($this->_code);
$method->setMethodTitle($this->getConfigData('name'));
if($data->getDestCountryId() == '...')
$method->setPrice(...);
else if (...)
...
$result->append($method);
return $result;
}
}
,并添加以下到您的config.xml
<default>
<carriers>
<mycompany_flatrate>
<active>1</active>
<model>mycompany_mymodule/flatrate</model>
<name>Flatrate</name>
<title>Flatrate</title>
<sallowspecific>0</sallowspecific>
</mycompany_flatrate>
</carriers>
</default>
的<config>
标签下。
是的。你有编程问题吗? – 2011-02-15 16:05:28