Home>Article>CMS Tutorial> How to cancel delivery method in ecshop
ecshop method to cancel delivery method: 1. Find and open the "flow.dwt" file, and then delete "2ad971cd9ba7732031051590435ad792...< ;!-- {/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
配送方式
{$lang.name} {$lang.describe} {$lang.fee} {$lang.free_money} {$lang.insure_fee} {$shipping.shipping_desc} {$shipping.format_shipping_fee} {$shipping.free_money} {$shipping.insure_formated} {$lang.not_support_insure}
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 e353f4b12e30202cd8ee9c221b860f70 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!