% discountInEffect = False discountRate = .10 action = Request("action") If Session("customerid") = "" Then sSQL = "set rowcount 1 select customerID from customerID" set rs = Conn.Execute(sSQL) Session("customerid") = rs("customerID") cid = rs("customerID") rs.Close set rs = Nothing Conn.Execute "update customerID set customerID=customerID+1" Else cid = Session("customerid") End If If ucase(action) = "ADD" Then sSQL = "set rowcount 1 select id from product where sku='" & Request("sku") & "'" set rs = Conn.Execute(sSQL) If Not rs.EOF Then strSQL = "insert into cart (customerid, productid, qty) values ('" & cid & "'," & makeNumeric(rs("id")) & ",1)" Conn.Execute strSQL End If rs.Close set rs = Nothing Elseif action = "Update Quantities" Then i = 1 While Request("id" & i) <> "" If Int(makeNumeric(Request("qty" & i))) = 0 Then Conn.Execute "delete cart where id=" & Request("id" &i) Else Conn.Execute "update cart set qty=" & makeNumeric(Request("qty" & i)) & " where id=" & Request("id" & i) End If i = i + 1 Wend Elseif action = "Empty Cart" Then Conn.Execute "delete cart where customerid='" & cid & "'" Elseif action = "Checkout" Then ' response.redirect "https://www.futurepopshop.com:4753/checkout/shipping.asp?cid=" & cid response.redirect "/tbcheckout/shipframe.asp?cid=" & cid End If %>
|
||||||||||||||||||||