<%@ Language=VBScript %> <% Response.Buffer=true %> Laundry Carts
Account Access
<% Dim LaunConn Dim CookCartID Dim objFSO Set LaunConn=Server.CreateObject("ADODB.Connection") LaunConn.Open "DSN=LaundryCarts;" CookCartID = Session("CookCartID") CustID = Session("CustID") %>
Customer History
<% if request.querystring("custid") <> CustID AND Session("level") < 4 then response.redirect("http://www.laundry-carts.com") end if %> <% Set RsCust = Server.CreateObject("ADODB.Recordset") if Session("level") >=4 then custid = request.querystring("custid") end if With RsCust .Source= "SELECT BFirstName, BLastName FROM Customer WHERE CustomerID LIKE '" & CustID & "'" .ActiveConnection = "DSN=LaundryCarts;" .Open .Movefirst End With %>
<%= RsCust("BFirstName")%> <%= RsCust("BLastName")%>

<% RsCust.Close Set RsCust = Nothing Set RsCart = Server.CreateObject("ADODB.Recordset") StrSQL = "SELECT Cart.OrderDate, Cart.Comments, OrdStat.StatusName, Cart.CustID, Cart.OrderDate, Cart.OrderDate, Cart.Ordered, Cart.TotalPrice, Cart.TotalQuant, Cart.CartID, Cart.SpecInst" strSQL = strSQL & " FROM OrdStat INNER JOIN Cart ON OrdStat.OrdStatID = Cart.Status" strSQL = strSQL & " WHERE (((Cart.CustID)LIKE '" & CustID &"'))" strSQL = strSQL & " ORDER BY OrdStat.StatusOrder,Cart.OrderDate DESC;" With RsCart '.Source= "SELECT * FROM Cart WHERE Cart.CustID LIKE '" & CustID & "' ORDER BY Cart.Status, Cart.OrderDate" '.Source = "SELECT Cart.OrderDate, OrdStat.StatusName, Cart.CustID, Cart.ShipCost, Cart.OrderDate, Cart.OrderDate, Cart.Ordered,strSQL = strSQL & Cart.TotalPrice, Cart.TotalQuant, Cart.CartID FROM OrdStat INNER JOIN Cart ON OrdStat.OrdStatID = Cart.Status WHERE Cart.CustID LIKE '"& CustID & "' ORDER BY OrdStat.StatusOrder,Cart.OrderDate;" .Source = strSQL .ActiveConnection = "DSN=LaundryCarts;" .Open End With 'Response.Write strSQL If NOT RsCart.EOF Then RsCart.MoveFirst Do While Not RsCart.EOF Response.Write ("") Response.Write ("") Response.Write ("") Response.Write "" Response.Write ("") Response.Write ("") Response.Write ("") Response.Write ("") Response.Write ("
Order Number:" & RsCart("CartID") & "Ordered On:" & RsCart("OrderDate") & "Status:" & RsCart("StatusName") &"
Special Instructions:
") Response.write RsCart("SpecInst") Response.Write ("
Comments:
") Response.write RsCart("comments") Response.Write ("
") ' Start the shopping cart table Response.Write "
" Response.Write "" Response.Write "" Response.Write "" Response.Write "" Response.Write "" ' Start the form for updating the cart 'Response.Write "" 'Response.Write "" ' Select all parts from the user's cart Set RsCartItem = Server.CreateObject("ADODB.Recordset") With RsCartItem .Source= "SELECT CartID, Status, PartID, Quantity, Price, PartDesc, Quantity * Price AS Price1 FROM CartItems WHERE CartID LIKE '" & RsCart("CartID") & "'" .ActiveConnection = "DSN=LaundryCarts;" .Open .Movefirst End With Do While NOT RsCartItem.EOF Response.Write "" Response.Write "" ' Set these next form inputs to be named spesifically to the part they are for. ' Refer higher up to read about how this is my favorite work. Response.Write "" if rscartitem("status") = " " then Response.Write "" else Response.Write "" end if Response.Write "" RsCartItem.MoveNext Loop RsCartItem.Close Set RsCartItem = Nothing ' If there are no items in the cart, say so! 'strSQL = "SELECT TotalPrice FROM Cart WHERE CustID LIKE '" & Request.Cookies("costcookie")("CustID") & " AND Ordered LIKE 'TRUE' ORDER BY OrderDate" 'Set Costls1 = CostConn.Execute(strSQL) Response.Write "" Response.Write "" Response.Write "
Part NumberDescriptionQuantityItem StatusPrice
" & RsCartItem("PartID") &"" & RsCartItem("PartDesc") &"" & RsCartItem("Quantity") & " " & RsCartItem("Status") & "$" & formatnumber(RsCartItem("Price"),2) &" " & QuantUpdate & "
   Price:$" & formatnumber(RsCart("TotalPrice"),2) & "
   Total Price:$" & formatnumber(RsCart("TotalPrice"), 2) & "

" RsCart.MoveNext Loop RsCart.Close Set RsCart = Nothing Else Response.Write "

Sorry, We have no record of orders placed.
" End If LaunConn.Close Set LaunConn = Nothing %>

Return to Menu


  Call Us: 1-866-891-5513, Email Us: parts@sterlingequipmentco.com
All contents © copyright 2004 Laundry Cart Co., All rights reserved.