要删除ecshop配送方式和支付方式。如何操作呢。首先我们必须修改 ecshop 购物车 js.然后修改 flow.php 购物车 php.通过双向修改。处理 flow.dwt.可以让 ecshop 购买流程更加简化。以下是代码思路.
1:js/shopping_flow.js 函数 checkOrderForm(frm)
修改成以下
# 汇站网
# https://www.huizhanii.com/15942.html
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;
}
2:flow.php 的 done 中删除以下代码
在$order[‘log_id’] = insert_pay_log($new_order_id, $order[‘order_amount’], PAY_ORDER);下面
# 汇站网
# https://www.huizhanii.com/15942.html
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);
}
3:flow.dwt 的 done 中
请你选择支付宝支付或货到付款
这样修改.就完成了对 ecshop 购买流程的简化.
转载请注明:汇站网 » 精简 ecshop 删除配送 与支付方式