要删除ecshop配送方式和支付方式。如何操作呢。首先我们必须修改ecshop购物车js.然后修改flow.php购物车php.通过双向修改。处理flow.dwt.可以让ecshop购买流程更加简化。以下是代码思路.
1: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;
}
2:flow.php的done中删除以下代码
在$order['log_id'] = insert_pay_log($new_order_id, $order['order_amount'], PAY_ORDER);下面
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中
<strong>请你选择支付宝支付或货到付款</strong>。<br />
这样修改.就完成了对ecshop购买流程的简化. (责任编辑:最模板) |