轻源码

  • QingYuanMa.com
  • 全球最大的互联网技术和资源下载平台
搜索
一起源码网 门户 ECShop网店 查看主题

ECSHOP购物车流程删除电话,邮箱,手机,必填选项改成非必填

发布者: venlove | 发布时间: 2018-7-16 08:33| 查看数: 4268| 评论数: 1|帖子模式

[size=12.0000pt][size=12.0000pt]各位网店系统用户大家好,欢迎来到图文教程,今天为大家详细解说一下ECSHOP购物车流程删除电话,电子邮件,必填选项改成非必填手机改成必填项[size=12.0000pt][size=12.0000pt]。

[size=12.0000pt][size=12.0000pt]ECSHOP教程网ECSHOP视频教程也再不断的完善与跟进,期待大家的关注!希望在ECSHOP的道路上,[size=12.0000pt]网与您一路同行!


[size=12.0000pt]首先先来说下怎么删除电话、[size=12.0000pt]邮箱

[size=12.0000pt]1.注册页面电话/邮箱删除:后台会员注册项设置---电话打勾去掉  邮箱打勾去掉



[size=12.0000pt]2. 打开js/shopping_flow.js文件,找到checkConsignee()函数

[size=12.0000pt]
1:如何设置“收货人姓名”为可选项?
打开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;
}*/
这段该注释掉


[size=12.0000pt]然后打开:library/这个文件夹 找到consignee.lbi文件
[size=12.0000pt]搜索:
  1. {$lang.phone}:
  2. {$lang.require_field}
复制代码

[size=12.0000pt]直接删除 这样就删除掉电话了,如果要保留 删除[size=12.0000pt][size=12.0000pt]这个就可以{$lang.require_field}===必填 这句话



[size=12.0000pt]ecshop"电子邮件地址"为选填项
[size=12.0000pt]
  1. {$lang.email_address}:
  2.    
  3.     {$lang.require_field}
复制代码
[/code][size=12.0000pt][size=12.0000pt]直接删除 这样就删除掉[size=12.0000pt]电子邮件地址了,如果要保留 删除[size=12.0000pt][size=12.0000pt]这个就可以[size=12.0000pt]{$lang.require_field}===必填 这句话

用户中心还有收货人信息电话和邮箱: 打开flow.dwt

找到电话删除
找到邮箱删除

[size=12.0000pt]

[size=12.0000pt]

[size=12.0000pt]现在谈谈手机和固定电话请至少填写一项修改方法:

[size=12.0000pt]打开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);
}
}
[size=12.0000pt]

[size=12.0000pt]然后打开languages/zh_cn/shiping_flow.php  中,查找  $_LANG['flow_js']['tele_not_null'] ,大概109行,将此行修改为  $_LANG['flow_js']['tele_not_null'] = '手机和固定电话请至少填写一项!';

最新评论

alibabachem 发表于 2022-6-29 23:45
安卓系统代码开发

轻源码让程序更轻更快

QingYuanMa.com

工作时间 周一至周六 8:00-17:30

侵权处理

客服QQ点击咨询

关注抖音号

定期抽VIP

Copyright © 2016-2021 https://www.171739.xyz/ 滇ICP备13200218号

快速回复 返回顶部 返回列表