ecshop怎么取消配送方式

ECShop取消配送方式的方法:1、找到并打開“flow.dwt”文件,然后刪除“…”代碼;2、將”JS/shopping_flow.js“中的”checkOrderForm(frm)“改為”if (document.getElementById(…)“即可。

ecshop怎么取消配送方式

本教程操作環境:Windows10系統、ecshop2.7.3版、DELL G3電腦

ecshop怎么取消配送方式?

ECSHOP去除配送方式

以2.7.3默認版為例

1.在flow.dwt中刪除這一段

<!--{if $total.real_goods_count neq 0}--> ????????<div> ??????????<h3>配送方式</h3> ??????????<div> ????????????<table> ??????????????<tr> ????????????????<th>?</th> ????????????????<th>{$lang.name}</th> ????????????????<th>{$lang.describe}</th> ????????????????<th>{$lang.fee}</th> ????????????????<th>{$lang.free_money}</th> ????????????????<th>{$lang.insure_fee}</th> ??????????????</tr> ??????????????<!-- {foreach from=$shipping_list item=shipping key=key} 循環配送方式 --> ??????????????<tr> ????????????????<td> ??????????????????<input> ????????????????</td> ????????????????<td><label>{$shipping.shipping_name}</label></td> ????????????????<td>{$shipping.shipping_desc}</td> ????????????????<td>{$shipping.format_shipping_fee}</td> ????????????????<td>{$shipping.free_money}</td> ????????????????<td> ??????????????????<!-- {if $shipping.insure neq 0} --> ??????????????????{$shipping.insure_formated} ??????????????????<!-- {else} --> ??????????????????{$lang.not_support_insure} ??????????????????<!-- {/if} --> ????????????????</td> ??????????????</tr> ??????????????<!-- {/foreach} 循環配送方式 --> ??????????????<tr> ????????????????<td> ??????????????????<label> ??????????????????<input> ??????????????????{$lang.need_insure} ??????????????????</label> ????????????????</td> ??????????????</tr> ????????????</table> ??????????</div> ????????</div><!-- /colbox --> ????????<!-- {else} --> ????????<input> ????????<!-- {/if} -->

2.在js/shopping_flow.js中的checkOrderForm(frm)改為

function?checkOrderForm(frm) { ? ??//?檢查用戶輸入的余額 ??if?(document.getElementById("ECS_SURPLUS")) ??{ ????var?surplus?=?document.getElementById("ECS_SURPLUS").value; ????var?error???=?Utils.trim(Ajax.call('flow.php?step=check_surplus',?'surplus='?+?surplus,?null,?'GET',?'TEXT',?false)); ? ????if?(error) ????{ ??????try ??????{ ????????document.getElementById("ECS_SURPLUS_NOTICE").innerHTML?=?error; ??????} ??????catch?(ex) ??????{ ??????} ??????return?false; ????} ??} ? ??//?檢查用戶輸入的積分 ??if?(document.getElementById("ECS_INTEGRAL")) ??{ ????var?integral?=?document.getElementById("ECS_INTEGRAL").value; ????var?error????=?Utils.trim(Ajax.call('flow.php?step=check_integral',?'integral='?+?integral,?null,?'GET',?'TEXT',?false)); ? ????if?(error) ????{ ??????return?false; ??????try ??????{ ????????document.getElementById("ECS_INTEGRAL_NOTICE").innerHTML?=?error; ??????} ??????catch?(ex) ??????{ ??????} ????} ??} ??frm.action?=?frm.action?+?'?step=done'; ??return?true; }

3.在flow.php中 if ($_REQUEST[‘step’] == ‘done’中注釋掉

if?($order['order_amount']?&gt;?0) ????{ ????????$payment?=?payment_info($order['pay_id']); ? ????????include_once('includes/modules/payment/'?.?$payment['pay_code']?.?'.php'); ? ????????$pay_obj????=?new?$payment['pay_code']; ? ????????$pay_online?=?$pay_obj-&gt;get_code($order,?unserialize_config($payment['pay_config'])); ? ????????$order['pay_desc']?=?$payment['pay_desc']; ? ????????$smarty-&gt;assign('pay_online',?$pay_online); ????}

if(isset($is_real_good)) ????{ ????????$sql="SELECT?shipping_id?FROM?"?.?$ecs-&gt;table('shipping')?.?"?WHERE?shipping_id=".$order['shipping_id']?."?AND?enabled?=1";? ????????if(!$db-&gt;getOne($sql)) ????????{ ???????????show_message($_LANG['flow_no_shipping']); ????????} ????}

4.在flow.dwt中的中的文字可以自己定義。

推薦學習:《ECShop教程

? 版權聲明
THE END
喜歡就支持一下吧
點贊5 分享