您现在的位置是:首页 > cms教程 > ecshop商城教程ecshop商城教程

ecshop商品订单只要有一个包邮商品,整个商品订单全部包邮

陈莉汐2024-01-16 21:18:39ecshop商城教程已有8人查阅

导读ecshop商品订单只要有一个包邮商品,整个商品订单全部包邮1. includes/lib_order.php搜索“查看购物车中是否全为免运费商品,若是则

ecshop商品订单只要有一个包邮商品,整个商品订单全部包邮
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']);
OK

本文标签:

很赞哦! (0)

暂无内容
暂无内容
暂无内容
暂无内容
留言与评论 (共有 0 条评论)
昵称:
匿名发表 登录账号
         
验证码: