经由网友反馈捆绑销售有此BUG后,我们立即安排技术人员测试.BUG详见 http://bbs.kesion.com/dispbbs.asp?boardid=41&Id=129094
现提供临时解决方案:
1.订单提交成功后,订单金额不对的修改方法。
打开shop/order.asp,找到200行左右的以下代码
'将捆绑促销的抢购商品加入KS_OrderItem表
Dim RSK:Set RSK=Conn.Execute("Select I.ID,I.Title,I.ServiceTerm,I.Price_Original,I.Price,b.Price as realprice,b.amount,b.AttributeCart From KS_Product I inner Join KS_ShopBundleSelect b on i.id=b.pid Where B.ProID=" & RS("ID") & " and b.username='" & GetUserID & "' order by I.id")
Do While Not RSK.Eof
Set RSA=Server.CreateObject("ADODB.RecordSet")
RSA.Open "select top 1 * from KS_OrderItem where ID is null",Conn,1,3
RSA.AddNew
RSA("OrderID")=OrderID
RSA("ProID")=RSK("ID")
RSA("SaleType")=6 '捆绑销售的商品
RSA("Price_Original")=RSK("Price_Original")
RSA("Price")=RSK("Price")
RSA("IsChangedBuy")=0
RSA("LimitBuyTaskID")=0
RSA("IsLimitBuy")=0
RSA("RealPrice")=RSK("RealPrice")
RSA("Amount")=RSK("Amount")
RSA("AttributeCart")=RSK("AttributeCart")
RSA("TotalPrice")=Round(RSK("RealPrice")*RSK("Amount"),2)
RSA("BeginDate")=Now
RSA("ServiceTerm")=RSK("ServiceTerm")
RSA("PackID")=0
RSA("BundleSaleProID")=RS("ID")
RSA.Update
moneyGoods=MoneyGoods + Round(RSK("RealPrice")*RSK("Amount"),2) '将捆绑销售价计入订单总价
RSA.Close:Set RSA=Nothing
RSK.MoveNext
Loop
RSK.Close:Set RSK=Nothing
增加以上红色代码后,下单成功后的订单价格就不会出错了.
2.后台显示不正确的修改方法。
打开admin/ks.shoporder.asp,找到700多行的以下代码'取得捆绑销售商品
Function GetBundleSalePro(ByRef TotalPrice,ProID,OrderID)
Dim Str,RS,XML,Node
Set RS=Server.CreateObject("adodb.recordset")
RS.Open "Select I.Title,I.Unit,O.* From KS_OrderItem O inner join KS_Product I On O.ProID=I.ID Where O.SaleType=6 and BundleSaleProID=" & ProID & " and OrderID='" & OrderID & "' order by O.id",conn,1,1
If Not RS.Eof Then
Set XML=KS.RsToXml(rs,"row","")
End If
RS.Close:Set RS=Nothing
If IsObject(XML) Then
str=str & "<tr height=""25"" align=""left""><td colspan=9 style=""color:green""> 选购捆绑促销:</td></tr>"
For Each Node In Xml.DocumentElement.SelectNodes("row")
str=str & "<tr>"
str=str &" <td style='color:#999999'> " & Node.SelectSingleNode("@title").text &"</td>"
str=str &" <td align='center'>" & Node.SelectSingleNode("@unit").text &"</td>"
str=str &" <td align='center'>" & Node.SelectSingleNode("@amount").text &"</td>"
str=str &" <td align='center'>" & formatnumber(Node.SelectSingleNode("@price_original").text,2,-1) &"</td>"
str=str &" <td align='center'>" & formatnumber(Node.SelectSingleNode("@realprice").text,2,-1) &"</td>"
str=str &" <td align='center'>" & formatnumber(Node.SelectSingleNode("@realprice").text,2,-1) &"</td>"
str=str &" <td align='right'>" & formatnumber(Node.SelectSingleNode("@realprice").text&Node.SelectSingleNode("@amount").text,2,-1) &"</td>"
str=str &" <td align='center'>" & Node.SelectSingleNode("@serviceterm").text &"</td>"
str=str &" <td align='center'>" & Node.SelectSingleNode("@remark").text &"</td>"
str=str & "</tr>"
TotalPrice=TotalPrice +round(Node.SelectSingleNode("@realprice").text&Node.SelectSingleNode("@amount").text,2)
Next
End If
GetBundleSalePro=str
End Function
注意将上面两处红色的 & 改成 * 即可
温馨提示:这两处小BUG会在下个版本一并修复。