账号通
    

账号  

密码  

6070

查看

15

回复
主题:[分享]SP5商城图片alt生成静态无效的解决方式 [收藏主题] 转到:  
一生有你 当前离线

10439

主题

0

广播

18

粉丝
添加关注
级别:版主

用户积分:72521 分
登录次数:1969 次
注册时间:2006/7/1
最后登录:2021/8/25
一生有你 发表于:2009/11/15 11:08:00   | 显示全部帖子 查看该作者主题 楼主 
做在线知识付费 选科汛云开店

问题:http://bbs.kesion.com/dispbbs.asp?boardid=41&Id=110045

 

商城系统不生成静态一切正常,生成静态后由于标签解释顺序原因导致不能被解释

 

解决方法打开ks_cls/kesion.label.commoncls.asp

 

找到以下代码

     case "getgroupphoto"     '商城组图
       Dim SQL,DefaultGroupStr,DefaultGroupName,DefaultBigPic,DefaultSmallPic,GroupImgList
       Dim RSG:Set RSG=Conn.Execute("select ID,ProID,SmallPicUrl,BigPicUrl,GroupName from ks_proimages where ProID=" & ItemID & " and id in (select min(id) from ks_proimages where ProID=" & ItemID & " group by groupname)")
       If Not RSG.Eof Then SQL=RSG.GetRows(-1):RSG.Close
       If IsArray(SQL) Then
         For i=0 To Ubound(SQL,2)
        if i=0 then
         DefaultGroupName=SQL(4,I)
         DefaultGroupStr= "选择颜色:<span id=""ColorArea"">" & sql(4,i) &"</span><br />"
         DefaultSmallPic=SQL(2,I)
         DefaultBigPic=SQL(3,I)
        end if
         DefaultGroupStr=DefaultGroupStr & "<span onmouseover=""ShowPhoto('" & SQL(2,I) & "','" & SQL(3,I) & "')"" onclick=""LoadByGroup('"& KS.Setting(3) & "','"& SQL(4,I) & "'," & SQL(1,I) &");"" style=""cursor:pointer;border: white 2px solid; display: inline-block;"" valign=""top""><img src=""" & SQL(2,i) & """ border=""0"" width=""45"" height=""56""></span>"
         Next
       Set RSG=Conn.Execute("Select ID,ProID,SmallPicUrl,BigPicUrl From ks_proimages where ProID=" & ItemID & " and groupname='" & DefaultGroupName & "'")
      If Not RSG.Eof Then SQL=RSG.GetRows(-1):RSG.Close
      If IsArray(SQL) Then
        For I=0 To Ubound(SQL,2)
       GroupImgList=GroupImgList & "<span><img width=""45"" height=""56"" style=""cursor:pointer"" onmouseover=""ShowPhoto('" & SQL(2,I) & "','" & SQL(3,I) & "');this.className='CurrSmallPic';"" onmouseout=""SetMouseOutPhoto();if(currobj!=this){this.className='DefaultSmallPic';}"" onclick=""SetDefaultPhoto(this,'" & SQL(2,I) & "','" & SQL(3,I) & "')"" class=""DefaultSmallPic"" src=""" & SQL(2,I) & """ border=""0""></span>"
       If (I+1) Mod 5=0 Then GroupImgList=GroupImgList & "<div style=""height:5px;overflow:hidden""></div>"
        Next
      End If
      Else
      DefaultBigPic=GetNodeText("bigphoto")
      DefaultSmallPic=GetNodeText("photourl")
      End If
      If DefaultBigPic="" Or IsNull(DefaultBigPic) Then DefaultBigPic=DomainStr & "images/nopic.gif"
      If DefaultSmallPic="" Or IsNull(DefaultSmallPic) Then DefaultSmallPic=DomainStr & "images/nopic.gif"
       Dim G_T:G_T=LFCls.GetConfigFromXML("ProImages","/labeltemplate/label","proimages")
       G_T = Replace(G_T,"{$GetInstallDir}",KS.Setting(3))
       G_T = Replace(G_T,"{$DefaultBigPic}",DefaultBigPic)
       G_T = Replace(G_T,"{$DefaultSmallPic}",DefaultSmallPic)
       G_T = Replace(G_T,"{$DefaultGroupStr}",DefaultGroupStr)
       G_T = Replace(G_T,"{$GroupImgList}",GroupImgList)
       G_T = Replace(G_T,"{$BigWidth}",Param(0))
       G_T = Replace(G_T,"{$BigHeight}",Param(1))
       G_T = Replace(G_T,"{$GetProductName}",GetNodeText("title"))
       Echo G_T

 

增加上面红色的那句即可,最后要重新生成一下商品页

 
  支持(0) | 反对(0) 回到顶部顶端 回到底部底部
<上一主题 | 下一主题 >
Powered By KesionCMS Version X1
厦门科汛软件有限公司 © 2006-2016 页面执行0.06250秒 powered by KesionCMS 9.0