解决满多少免首重的问题

2016-07-07 14:55 来源:www.chinab4c.com 作者:ecshop专家

以圆通为例文件includes\modules\shipping\yto.php
第115行左右
if ($this->configure['free_money'] > 0 && $goods_amount >= $this->configure['free_money'])
{
return 0;
}

改成:
if ($this->configure['free_money'] > 0 && $goods_amount >= $this->configure['free_money'])
{
//return 0;

$fee=0;
$this->configure['fee_compute_mode'] = !empty($this->configure['fee_compute_mode']) ? $this->configure['fee_compute_mode'] : 'by_weight';
if ($this->configure['fee_compute_mode'] == 'by_number')
{
$fee = $goods_number * $this->configure['item_fee'];
}
else
{
if ($goods_weight > 1)
{
$fee += (ceil(($goods_weight - 1))) * $this->configure['step_fee'];
}
}
return $fee;

}
即可,更新一下缓存,到购物流程中看是不是达到满多少免首重了?
遗憾的是,不能满多少包邮

回答:
不错!

ECSHOP学习资料:http://www.phpally.com