1.按件计费的快递需要在对应的php文件中添加结算方式 array('name' => 'fee_compute_mode', 'value'=>'by_number'), /* 按件数计费 */(放在 $modules[$i]['configure']中)
2.将includes/lib_order.php的cart_weight_price2方法的
$sql = 'SELECT SUM(g.goods_weight * c.goods_number) AS weight, ' .
'SUM(c.goods_price * c.goods_number) AS amount, ' .
'SUM(c.goods_number) AS number '.
'FROM ' . $GLOBALS['ecs']->table('cart') . ' AS c '.
'LEFT JOIN ' . $GLOBALS['ecs']->table('goods') . ' AS g ON g.goods_id = c.goods_id '.
"WHERE g.supplier_id='". $supplier_id ."' and c.session_id = '" . SESS_ID . "' " .
"AND rec_type = '$type' AND g.is_shipping = 0 AND c.extension_code != 'package_buy'";
修改为:
$sql = 'SELECT SUM(g.goods_weight * c.goods_number) AS weight, ' .
'SUM(c.goods_price * c.goods_number) AS amount, ' .
'SUM(c.goods_number) AS number '.
'FROM ' . $GLOBALS['ecs']->table('cart') . ' AS c '.
'LEFT JOIN ' . $GLOBALS['ecs']->table('goods') . ' AS g ON g.goods_id = c.goods_id '.
"WHERE g.supplier_id='". $supplier_id ."' and c.user_id = '" . $_SESSION['user_id'] . "' " .
"AND rec_type = '$type' AND g.is_shipping = 0 AND c.extension_code != 'package_buy'";