分类分类
2015-03-16 14:59作者:zhao
各位ECSHOP网店系统用户大家好,欢迎来到ECSHOP教程网图文教程,今天为大家详细解说一下ECSHOP购物车流程删除电话,电子邮件,必填选项改成非必填,手机改成必填项。
ECSHOP教程网ECSHOP视频教程也再不断的完善与跟进,期待大家的关注!希望在ECSHOP的道路上,ECSHOP教程网与您一路同行!
首先先来说下怎么删除电话、邮箱
1.注册页面电话/邮箱删除:后台会员注册项设置---电话打勾去掉 邮箱打勾去掉
2. 打开js/shopping_flow.js文件,找到checkConsignee()函数
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=consigneen");
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=consigneen");
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=consigneen");
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=consigneen");
exit;
}*/
这段该注释掉
然后打开:library/这个文件夹 找到consignee.lbi文件
搜索:
<td bgcolor="#ffffff">{$lang.phone}:</td>
<td bgcolor="#ffffff"><input name="tel" type="text" class="inputBg" id="tel_{$sn}" value="{$consignee.tel|escape}" />
{$lang.require_field}</td>
直接删除 这样就删除掉电话了,如果要保留 删除这个就可以{$lang.require_field}===必填 这句话
ecshop"电子邮件地址"为选填项:
<td bgcolor="#ffffff">{$lang.email_address}:</td>
<td bgcolor="#ffffff"><input name="email" type="text" class="inputBg" id="email_{$sn}" value="{$consignee.email|escape}" />
{$lang.require_field}</td>
直接删除 这样就删除掉电子邮件地址了,如果要保留 删除这个就可以{$lang.require_field}===必填 这句话
用户中心还有收货人信息电话和邮箱: 打开flow.dwt
找到电话删除
找到邮箱删除
现在谈谈手机和固定电话请至少填写一项修改方法:
打开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);
}
}
if (frm.elements['mobile'] && frm.elements['mobile'].value.length > 0 && (!Utils.isTel(frm.elements['mobile'].value)))
{
err = true;
msg.push(mobile_invaild);
}
改成:
if ((Utils.isEmpty(frm.elements['tel'].value))&&(Utils.isEmpty(frm.elements['mobile'].value)))
{
err = true;
msg.push(tele_not_null);
}
else
{
if (frm.elements['tel'] && frm.elements['tel'].value.length > 0 && !Utils.isTel(frm.elements['tel'].value))
{
err = true;
msg.push(tele_invaild);
}
if (frm.elements['mobile'] && frm.elements['mobile'].value.length > 0 && (!Utils.isMobile(frm.elements['mobile'].value)))
{
err = true;
msg.push(mobile_invaild);
}
}
然后打开languages/zh_cn/shiping_flow.php 中,查找 $_LANG['flow_js']['tele_not_null'] ,大概109行,将此行修改为 $_LANG['flow_js']['tele_not_null'] = '手机和固定电话请至少填写一项!';
相关