服务报价 | 域名主机 | 网络营销 | 软件工具| [加入收藏]
 热线电话: #
当前位置: 主页 > php教程 > ecshop教程 >

ecshop订单中只要有一个是包邮商品,就整个订单都包邮

时间:2014-12-08 12:08来源:未知 作者:最模板 点击:
includes/lib_order.php搜索查看购物车中是否全为免运费商品,若是则把运费赋为零,将 $sql = SELECT count(*) FROM . $GLOBALS[ecs]-table(cart) . WHERE `session_id` = . SESS_ID. AND `extension_code` != package_buy AND
includes/lib_order.php搜索“查看购物车中是否全为免运费商品,若是则把运费赋为零”,将
 
$sql = 'SELECT count(*) FROM ' . $GLOBALS['ecs']->table('cart') . " WHERE  `session_id` = '" . SESS_ID. "' AND `extension_code` != 'package_buy' AND `is_shipping` = 0";  
修改为
 
$sql = 'SELECT count(*) FROM ' . $GLOBALS['ecs']->table('cart') . " WHERE  `session_id` = '" . SESS_ID. "' AND `extension_code` != 'package_buy' AND `is_shipping` = 1"; 
 
再把
 
$total['shipping_fee'] = ($shipping_count == 0 AND $weight_price['free_shipping'] == 1) ?0 :  shipping_fee($shipping_info['shipping_code'],$shipping_info['configure'], $weight_price['weight'], $total['goods_price'], $weight_price['number']);  
 
修改为
 
$total['shipping_fee'] = ($shipping_count >= 1 AND $weight_price['free_shipping'] == 1) ?0 :  shipping_fee($shipping_info['shipping_code'],$shipping_info['configure'], $weight_price['weight'], $total['goods_price'], $weight_price['number']);  
 
即可以实现购物车中只要有一个商品是免邮费的则整个购物车中都免邮。
(责任编辑:最模板)
顶一下
(1)
100%
踩一下
(0)
0%
------分隔线----------------------------