帮我解释一下asp购物车代码,谢谢拉!!!

来源:百度知道 编辑:UC知道 时间:2024/06/27 06:58:11
<%
strCpbm = Request("cpbm")
if ((len(trim(strCpbm)) = 0) or (strCpbm = "undefined")) then
strCheck = "no"
end if

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 "nothing.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

if ((len(trim(strCpbm)) = 0) or (strCpbm = "undefined")) then
strCheck = "no"
end if
判断一下获得的值是不是为空

Products = Split(Request("cpbm"), ", ")
For I=0 To UBound(Products)

得到用户订的产品放在数组里面

然后把这个数组放在Session(Productlist)

在下面判断是不是为空
如要为空就跳到 nothing.asp
这是我的理解 不是很全只能说到这了