经用户反应V6.5企业空间里的模板调用不了会员系统的自定义字段,经官方测试证实确实存在这个问题,原因是企业空间的标签替换函数没有去查询会员表.解决方法如下:
打开KS_Cls/Kesion.SpaceCls.asp找到,函数:ReplaceEnterpriseInfo代码如下:
Function ReplaceEnterpriseInfo(ByVal Content,username)
On Error Resume Next
Dim RS:Set RS=Server.CreateObject("ADODB.RECORDSET")
RS.Open "Select top 1 * From KS_EnterPrise Where UserName='" & UserName & "'",conn,1,1
IF RS.Eof Then
RS.Close:Set RS=Nothing
ReplaceEnterpriseInfo=""
End If
Content=Replace(Content,"{$GetCompanyName}",RS("CompanyName"))
if isnull(RS("BusinessLicense")) then
Content=Replace(Content,"{$GetBusinessLicense}","---")
else
Content=Replace(Content,"{$GetBusinessLicense}",RS("BusinessLicense"))
end if
if isnull(RS("profession")) then
Content=Replace(Content,"{$GetProfession}","---")
else
Content=Replace(Content,"{$GetProfession}",RS("profession"))
end if
if isnull(RS("Companyscale")) then
Content=Replace(Content,"{$GetCompanyScale}","---")
else
Content=Replace(Content,"{$GetCompanyScale}",RS("Companyscale"))
end if
if isnull(rs("province")) then
Content=Replace(Content,"{$GetProvince}","---")
else
Content=Replace(Content,"{$GetProvince}",RS("province"))
end if
if isnull(rs("city")) then
Content=Replace(Content,"{$GetCity}","---")
else
Content=Replace(Content,"{$GetCity}",RS("city"))
end if
if isnull(RS("Contactman")) then
Content=Replace(Content,"{$GetContactMan}","---")
else
Content=Replace(Content,"{$GetContactMan}",RS("Contactman"))
end if
if isnull(RS("address")) then
Content=Replace(Content,"{$GetAddress}","---")
else
Content=Replace(Content,"{$GetAddress}",RS("address"))
end if
if isnull(RS("ZipCode")) Then
Content=Replace(Content,"{$GetZipCode}","---")
Else
Content=Replace(Content,"{$GetZipCode}",RS("zipcode"))
End If
If Isnull(RS("telphone")) Then
Content=Replace(Content,"{$GetTelphone}","---")
Else
Content=Replace(Content,"{$GetTelphone}",RS("telphone"))
End If
If IsNull(rs("fax")) then
Content=Replace(Content,"{$GetFax}","---")
else
Content=Replace(Content,"{$GetFax}",RS("fax"))
end if
if isnull(rs("weburl")) then
Content=Replace(content,"{$GetWebUrl}","---")
else
Content=Replace(Content,"{$GetWebUrl}",RS("weburl"))
end if
if isnull(rs("bankaccount")) then
Content=Replace(Content,"{$GetBankAccount}","---")
else
Content=Replace(Content,"{$GetBankAccount}",RS("bankaccount"))
end if
if isnull(RS("accountnumber")) then
Content=Replace(Content,"{$GetAccountNumber}","---")
else
Content=Replace(Content,"{$GetAccountNumber}",RS("accountnumber"))
end if
if isnull(RS("Mobile")) then
Content=Replace(Content,"{$GetMobile}","---")
else
Content=Replace(Content,"{$GetMobile}",RS("mobile"))
end if
if isnull(RS("QQ")) then
Content=Replace(Content,"{$GetQQ}","---")
else
Content=Replace(Content,"{$GetQQ}",RS("QQ"))
end if
if isnull(RS("Email")) then
Content=Replace(Content,"{$GetEmail}","---")
else
Content=Replace(Content,"{$GetEmail}",RS("Email"))
end if
Content =ReplaceUserDefine(101,Content,RS)
ReplaceEnterpriseInfo=Content
End Function
我们将其替换成
Function ReplaceEnterpriseInfo(ByVal Content,username)
On Error Resume Next
Dim RS:Set RS=Server.CreateObject("ADODB.RECORDSET")
RS.Open "Select top 1 a.classid,a.smallclassid,a.CompanyName as myCompanyName,BusinessLicense,profession,Companyscale,Contactman,a.ZipCode as myZipCode,a.telphone as mytelphone,a.province as myprovince,a.city as mycity,a.address as myaddress,a.fax as myfax,a.Mobile as mymobile,a.qq as myqq,a.email as myemail,weburl,bankaccount,accountnumber,b.* From KS_EnterPrise a inner join ks_user b on a.username=b.username Where a.UserName='" & UserName & "'",conn,1,1
IF RS.Eof Then
RS.Close:Set RS=Nothing
ReplaceEnterpriseInfo=""
End If
Content=Replace(Content,"{$GetCompanyName}",RS("myCompanyName"))
if isnull(RS("BusinessLicense")) then
Content=Replace(Content,"{$GetBusinessLicense}","---")
else
Content=Replace(Content,"{$GetBusinessLicense}",RS("BusinessLicense"))
end if
if instr(content,"{$GetProfession}")<>0 then
Content=Replace(Content,"{$GetProfession}",conn.execute("select top 1 classname from ks_enterpriseclass where id=" &RS("classid"))(0)&"-" &conn.execute("select top 1 classname from ks_enterpriseclass where id=" &RS("smallclassid"))(0))
end if
if isnull(RS("Companyscale")) then
Content=Replace(Content,"{$GetCompanyScale}","---")
else
Content=Replace(Content,"{$GetCompanyScale}",RS("Companyscale"))
end if
if isnull(rs("myprovince")) then
Content=Replace(Content,"{$GetProvince}","---")
else
Content=Replace(Content,"{$GetProvince}",RS("myprovince"))
end if
if isnull(rs("mycity")) then
Content=Replace(Content,"{$GetCity}","---")
else
Content=Replace(Content,"{$GetCity}",RS("mycity"))
end if
if isnull(RS("Contactman")) then
Content=Replace(Content,"{$GetContactMan}","---")
else
Content=Replace(Content,"{$GetContactMan}",RS("Contactman"))
end if
if isnull(RS("myaddress")) then
Content=Replace(Content,"{$GetAddress}","---")
else
Content=Replace(Content,"{$GetAddress}",RS("myaddress"))
end if
if isnull(RS("myZipCode")) Then
Content=Replace(Content,"{$GetZipCode}","---")
Else
Content=Replace(Content,"{$GetZipCode}",RS("myzipcode"))
End If
If Isnull(RS("mytelphone")) Then
Content=Replace(Content,"{$GetTelphone}","---")
Else
Content=Replace(Content,"{$GetTelphone}",RS("mytelphone"))
End If
If IsNull(rs("myfax")) then
Content=Replace(Content,"{$GetFax}","---")
else
Content=Replace(Content,"{$GetFax}",RS("myfax"))
end if
if isnull(rs("weburl")) then
Content=Replace(content,"{$GetWebUrl}","---")
else
Content=Replace(Content,"{$GetWebUrl}",RS("weburl"))
end if
if isnull(rs("bankaccount")) then
Content=Replace(Content,"{$GetBankAccount}","---")
else
Content=Replace(Content,"{$GetBankAccount}",RS("bankaccount"))
end if
if isnull(RS("accountnumber")) then
Content=Replace(Content,"{$GetAccountNumber}","---")
else
Content=Replace(Content,"{$GetAccountNumber}",RS("accountnumber"))
end if
if isnull(RS("myMobile")) then
Content=Replace(Content,"{$GetMobile}","---")
else
Content=Replace(Content,"{$GetMobile}",RS("mymobile"))
end if
if isnull(RS("myQQ")) then
Content=Replace(Content,"{$GetQQ}","---")
else
Content=Replace(Content,"{$GetQQ}",RS("myQQ"))
end if
if isnull(RS("myEmail")) then
Content=Replace(Content,"{$GetEmail}","---")
else
Content=Replace(Content,"{$GetEmail}",RS("myEmail"))
end if
Content =ReplaceUserDefine(101,Content,RS)
ReplaceEnterpriseInfo=Content
End Function
这样替换后,在企业空间里就可以直接通过{$KS_自定义字段名称}调用到会员表的数据了.
tips:不仅在config/space.xml文件里可以调用,经测试也可以直接在企业空间的首页模板和其它页模板里调用
KESION 科汛软件
KESION 科汛软件是国内领先的在线教育软件及私域社交电商软件服务提供商,长期专注于为企业提供在线教育软件及社交电商SaaS平台解决方案。
公司核心产品云开店SaaS社交电商服务平台、在线教育SaaS服务平台、教育企业数字化SaaS云平台、企微营销助手、私有化独立部署品牌网校和在线教育咨询等。KESION 不断通过技术创新,提供产品和服务,助力企业向数字化转型,通过科技驱动商业革新,让商业变得更智慧!
一些用户可能由于对科汛产品进行过二次开发,未能及时升级到6.5版本.但V6.0可能在相关标签有点点问题(把不是本模型下的信息也关联出来了),修改如下 打开ks_clS/Kesion.Label.Fu
目前版本如果开通使用快钱人民币网关支付,支付成功后返回提示 "页面返回失败. 商家设置的返回地址不可到达",即用户支付成功后无法正常返回到会员中心及时入账.