欢迎来到素材无忧网,按 + 收藏我们
登录 注册 退出 找回密码

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

时间: 2024-02-25 10:43 阅读: 作者:素材无忧网

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

版权声明: 本站资源均来自互联网或会员发布,如果侵犯了您的权益请与我们联系,我们将在24小时内删除!谢谢!

转载请注明: ecshop商品订单只要有一个包邮商品,整个商品订单全部包邮

推荐文章
模板推荐