ecshop method to cancel delivery method: 1. Find and open the "flow.dwt" file, and then delete "...< ;!-- {/if} -->" code; 2. Change "checkOrderForm(frm)" in "js/shopping_flow.js" to "if (document.getElementById(...)".
The operating environment of this tutorial: Windows 10 system, ecshop version 2.7.3, DELL G3 computer
How to cancel the delivery method in ecshop?
ECSHOP removes delivery method
Take the 2.7.3 default version as an example
1. Delete this section in flow.dwt
<!--{if $total.real_goods_count neq 0}--> <div class="colbox colpd"> <h3 id="配送方式">配送方式</h3> <div class="colboxcontent"> <table border="0" cellspacing="0" class="styletable"> <tr> <th width="5"> </th> <th width="100">{$lang.name}</th> <th width="400">{$lang.describe}</th> <th width="100">{$lang.fee}</th> <th width="80">{$lang.free_money}</th> <th width="80">{$lang.insure_fee}</th> </tr> <!-- {foreach from=$shipping_list item=shipping key=key} 循环配送方式 --> <tr> <td> <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}" οnclick="selectShipping(this)" id="shipping{$key}" /> </td> <td><label for="shipping{$key}">{$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 colspan="6" align="right"> <label for="ECS_NEEDINSURE" class="textStrong"> <input name="need_insure" type="checkbox" οnclick="selectInsure(this.checked)" value="1"{if $order.need_insure} checked="checked"{/if}{if $insure_disabled} disabled="disabled"{/if} id="ECS_NEEDINSURE" /> {$lang.need_insure} </label> </td> </tr> </table> </div> </div><!-- /colbox --> <!-- {else} --> <input name = "shipping" type="radio" value = "-1" checked="checked" style="display:none" /> <!-- {/if} -->
2. Change checkOrderForm(frm) in js/shopping_flow.js to
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. In flow.php if ($_REQUEST['step'] == 'done' Comment out
if ($order['order_amount'] > 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->get_code($order, unserialize_config($payment['pay_config'])); $order['pay_desc'] = $payment['pay_desc']; $smarty->assign('pay_online', $pay_online); }
and
if(isset($is_real_good)) { $sql="SELECT shipping_id FROM " . $ecs->table('shipping') . " WHERE shipping_id=".$order['shipping_id'] ." AND enabled =1"; if(!$db->getOne($sql)) { show_message($_LANG['flow_no_shipping']); } }
4. The text in in flow.dwt can be defined by yourself.
Recommended learning: "ECShop Tutorial"
The above is the detailed content of How to cancel delivery method in ecshop. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Chinese version
Chinese version, very easy to use

Dreamweaver Mac version
Visual web development tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Atom editor mac version download
The most popular open source editor