<%@ LANGUAGE="VBScript" %> <% Sub PutToShopBag( cpbm, ProductList ) If Len(ProductList) = 0 Then ProductList = "'" & cpbm & "'" ElseIf InStr( ProductList, cpbm ) <= 0 Then ProductList = ProductList & ", '" & cpbm & "'" End If End Sub ProductList = Session("ProductList") Products = Split(Request("cpbm"), ", ") For I=0 To UBound(Products) PutToShopBag Products(I), ProductList Next Session("ProductList") = ProductList Head="以下是您所选购的产品清单" ProductList = Session("ProductList") If Len(ProductList) =0 Then Response.Redirect "Product.asp" response.end end if If Request("MySelf") = "Yes" Then ProductList = "" Products = Split(Request("cpbm"), ", ") For I=0 To UBound(Products) PutToShopBag Products(I), ProductList Next Session("ProductList") = ProductList End If If Len(ProductList) = 0 Then Response.Redirect "Product.asp" response.end end if set rs=server.createobject("adodb.recordset") sql = "Select * From Product" sql = sql & " Where Product_Id In (" & ProductList & ")" rs.open sql,conn,3,3 %> 以下是您所选购的物品清单

<%=Head%>

<% Sum = 0 While Not rs.EOF Quatity = CInt( Request( "Q_" & rs("Product_Id")) ) If Quatity <= 0 Then Quatity = CInt( Session(rs("Product_Id")) ) If Quatity <= 0 Then Quatity = 1 End If Session(rs("Product_Id")) = Quatity Sum = Sum + ccur(rs("P_NewPrice")) * Quatity %> <% rs.MoveNext Wend %>
商品编号 商品名称 商品数量 购买
<%=rs("Product_Id")%> <%=rs("Title")%>  " Value="<%=Quatity%>" Size="3"> " Checked>
 

               

注意:改变“商品数量”需点击“更改数量”按钮!

<% rs.close conn.close %>