默认在跳到支付宝支付时,显示的是订单号。
我们这里改进显示详细的商品名称。请打开
shop/payonline.asp 注意以下红色的增加的代码
Dim ID:ID=KS.ChkClng(KS.S("ID"))
Dim RS:Set RS=Server.CreateObject("ADODB.RECORDSET")
RS.Open "Select top 1 OrderID,MoneyTotal,DeliverType,Status,OrderType From KS_Order Where ID="& ID,Conn,1,1
If RS.Eof Then
rs.close:set rs=nothing
KS.Die "<script>alert('出错啦,没有找到订单!');history.back();</script>"
End If
If KS.ChkCLng(KS.Setting(49))=1 Then
If RS("Status")=0 Then
RS.Close:Set RS=Nothing
KS.Die "<script>alert('对不起,该订单还未确认,本站启用只有后台确认过的订单才能付款!');window.close();</script>"
End If
End If
Dim OrderID:OrderID=RS("OrderID")
Dim Money:Money=RS("MoneyTotal")
Dim DeliverType:DeliverType=RS("DeliverType")
Dim OrderType:OrderType=RS("OrderType")
RS.Close
Dim DeliverName,ProductName
RS.Open "Select Top 1 TypeName From KS_Delivery Where Typeid=" & DeliverType,conn,1,1
If Not RS.Eof Then
DeliverName=RS(0)
End IF
RS.Close
If OrderType=1 Then
RS.Open "Select top 10 subject as title From KS_GroupBuy Where ID in(Select proid From KS_OrderItem Where OrderID='" & OrderID& "')",conn,1,1
Else
RS.Open "Select top 10 Title From KS_Product Where ID in(Select proid From KS_OrderItem Where OrderID='" & OrderID& "')",conn,1,1
End If
If RS.Eof And RS.Bof Then
ProductName=OrderID
Else
经过以上修改后,下完单立即在点在线支付就会显示商品名称了。
还有一种情况是进入会员中心点支付的,则修改下
user/user_payonline.asp
同样找到并增加红色的代码即可
'支付商城订单
Sub PayShopOrder()
Dim ID:ID=KS.ChkClng(KS.S("ID"))
Dim RS:Set RS=Server.CreateObject("ADODB.RECORDSET")
RS.Open "Select top 1 OrderID,MoneyTotal,DeliverType,Status,OrderType From KS_Order Where ID="& ID,Conn,1,1
If RS.Eof Then
rs.close:set rs=nothing
KS.Die "<script>alert('出错啦!');history.back();</script>"
End If
If KS.ChkCLng(KS.Setting(49))=1 Then
If RS("Status")=0 Then
RS.Close:Set RS=Nothing
KS.Die "<script>alert('对不起,该订单还未确认,本站启用只有后台确认过的订单才能在线支付!');history.back();</script>"
End If
End If
Dim OrderID:OrderID=RS("OrderID")
Dim Money:Money=RS("MoneyTotal")
Dim DeliverType:DeliverType=RS("DeliverType")
Dim OrderType:OrderType=RS("OrderType")
RS.Close
Dim DeliverName,ProductName
RS.Open "Select Top 1 TypeName From KS_Delivery Where Typeid=" & DeliverType,conn,1,1
If Not RS.Eof Then
DeliverName=RS(0)
End IF
RS.Close
If OrderType=1 Then
RS.Open "Select top 10 subject as title From KS_GroupBuy Where ID in(Select proid From KS_OrderItem Where OrderID='" & OrderID& "')",conn,1,1
Else
RS.Open "Select top 10 Title From KS_Product Where ID in(Select proid From KS_OrderItem Where OrderID='" & OrderID& "')",conn,1,1
End If
If RS.Eof And RS.Bof Then
ProductName=OrderID
Else
Do While Not RS.Eof