ecshop订单中只要有一个是包邮商品,就整个订单都包邮 ecshop教程 - ecshop - 爱建站

,,cms教程,ecshop教程,,

SEO SEO

首页  >   ecshop > ecshop订单中只要有一个是包邮商品,就整个订单都包邮 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 ]);   即可以实现购物车中只要有一个商品是免邮费的则整个购物车中都免邮


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"]);  

 

即可以实现购物车中只要有一个商品是免邮费的则整个购物车中都免邮。

温馨提示:如果你想搭建一个电子商务商城网站,那么到的 ecshop模板堂 频道看看吧,这里有很多的商城模板哦!


ecshop订单中只要有一个是包邮商品,就整个订单都包邮 ecshop教程
http://www.yuedudg.cn/article/1182481.html

 

友情链接
帝国cms常识 wp之家 phpcms之家
织梦之家 discuz经验网 cms综合网
ecshop经验网 zblog之家


Tags: cms教程 ecshop教程


手机浏览本文

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

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

站内推荐

网站分类

标签列表

关于我们
文章内容来源互联网仅供参考,如果还有疑问请联系我们!我们将竭力帮您解决您的问题
联系我们:

QQ: 397423577 

email:397423577@qq.com

微信:ganenboy