不同客户群的表费率

时间:2013-02-12 04:29:35

标签: magento

有没有办法在Magento中为不同的客户群定义不同的表格费率?

我想创建ABC组并使其与其他用户的运费不同。

1 个答案:

答案 0 :(得分:0)

使用任何送货模块并自定义方法(Matrixrate是非常好的模块)

在(../model/Carrier/{ShippingMethod}.php)中修改collectRates()方法

public function collectRates(Mage_Shipping_Model_Rate_Request $request){
.....
$customer = Mage::helper('customer')->getCustomer();
$group = null;
if($customer)
{
    $group = $customer->getGroupId();
}
if($group == 'ID'){
// do the logic here 
}else{
return false; // disable the shipping method
}
......
}

检查客户群和退货率的方法或错误;