广州传奇网络

地址:广州市天河区东圃大马路富华楼C座

电话:13808825895

邮箱:gz020wbs@163.com

QQ:1564443073

网址:http://www.020wbs.com/

首页 > 二次开发Ecshop二次开发 > ecshop 收货人信息必填修改, 修改必填项,删除必填项,修改删除

二次开发Ecshop二次开发

二次开发Ecshop二次开发

ecshop 收货人信息必填修改, 修改必填项,删除必填项,修改删除

 1:如何设置 ecshop “ 收货人姓名”为可选项?
打开js/shopping_flow.js文件,找到checkConsignee()函数
/*if (Utils.isEmpty(frm.elements['consignee'].value))
{
err = true;
msg.push(consignee_not_null);
}*/
注释掉这一段。
flow.php中
/*if (!check_consignee_info($consignee, $flow_type))
{

ecs_header("Location: flow.php?step=consignee\n");
exit;
}*/
这段该注释掉
2:如何设置 ecshop "详细地址"为选填项
打开js/shopping_flow.js文件,找到checkConsignee()函数
注释掉下面
/*
if (frm.elements['address'] && Utils.isEmpty(frm.elements['address'].value))
{
err = true;
msg.push(address_not_null);
}*/
flow.php中
/*if (!check_consignee_info($consignee, $flow_type))
{

ecs_header("Location: flow.php?step=consignee\n");
exit;
}*/
这段该注释掉
3:如何设置 ecshop "电子邮件地址"为选填项
打开js/shopping_flow.js文件,找到checkConsignee()函数
注释掉下面
if ( ! Utils.isEmail(frm.elements['email'].value))
{
err = true;
msg.push(invalid_email);
}
flow.php中
/*if (!check_consignee_info($consignee, $flow_type))
{

ecs_header("Location: flow.php?step=consignee\n");
exit;
}*/
这段该注释掉
4:如何设置 ecshop"电话"为选填项
打开js/shopping_flow.js文件,找到checkConsignee()函数
注释掉下面
/*
if (Utils.isEmpty(frm.elements['tel'].value))
{
err = true;
msg.push(tele_not_null);
}
else
{
if (!Utils.isTel(frm.elements['tel'].value))
{
err = true;
msg.push(tele_invaild);
}
}
*/
flow.php中
/*if (!check_consignee_info($consignee, $flow_type))
{

ecs_header("Location: flow.php?step=consignee\n");
exit;
}*/
这段该注释掉


注意最后一步需要修改ia
去掉email必填项,还必须在修改 includes/lib_order.php文件
将 “check_consignee_info”函数中的检测语句修改,