ecshop优化15-取消配送方式

26 篇文章 0 订阅

 

http://www.weisuiyu.com/article/show/21

ecshop 取消用户选择配送方式功能

 

ecshop默认是用户可以选择配送方式的,但是这是不符合我们商家的利益的。我们需要商家自己来决定由哪家物流公司来配送而不是用户决定。

经过分析,在ecshop后台是可以编辑配送方式的,所以只要取消前台验证配送方式的功能问题就可以解决了。

首先注释掉shopping_flow.js文件中的相应代码:

/*  if ( ! shippingSelected)\r\n  {\r\n    alert(flow_no_shipping);\r\n    return false;\r\n  }*/

然后注释掉flow.php文件中相应代码:

/*        if(!$db->getOne($sql))\r\n        {\r\n           show_message($_LANG['flow_no_shipping']);\r\n        }*/

最后删掉flow.dwt中的对应代码就完工了,去测试吧。

 

 

 

 

 

 

 

 

 

 

http://www.ecmoban.com/article-1579.html



 

 


 

首先登陆ecshop后台 点击进入配送方式选项 只保留一个配送方式 其他的全部卸载

然后打开模板文件目录下的flow.dwt文件

搜索

<div class="flowBox">
    <h6><span>{$lang.shipping_method}</span></h6>

修改为

<div class="flowBox" style="display:none">
    <h6><span>{$lang.shipping_method}</span></h6>

搜索

<input name="shipping" type="radio" value="{$shipping.shipping_id}" {if $order.shipping_id eq $shipping.shipping_id}checked="true"{/if} supportCod="{$shipping.support_cod}" insure="{$shipping.insure}" οnlοad="selectShipping(this)" checked="checked" />

修改为

<input id="shipping" name="shipping" type="radio" value="{$shipping.shipping_id}" {if $order.shipping_id eq $shipping.shipping_id}checked="true"{/if} supportCod="{$shipping.support_cod}" insure="{$shipping.insure}" οnlοad="selectShipping(this)" checked="checked" />

修改完成之后 在文件底部加入

<script>
οnlοad=selectShipping(document.getElementById('shipping'));
</script>

结束后清除缓存尝试

 




同样道理,也可以取消支付方式的选择

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值