|
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
%>
<%
if Session("level") >=4 then
custid = request.querystring("custid")
end if
strSQL = "SELECT BFirstName, BLastName FROM Customer WHERE CustomerID LIKE '" & CustID & "'"
Set RsCust = LaunConn.Execute(strSQL)
%>
| <%= RsCust("BFirstName")%> |
<%= RsCust("BLastName")%> |
<%
RsCust.Close
Set RsCust = Nothing
Set RsCust = LaunConn.Execute(strSQL)
StrSQL = "SELECT Cart.OrderDate, Cart.Comments, OrdStat.StatusName, Cart.CustID, Cart.OrderDate, Cart.OrderDate, Cart.Ordered, Cart.TotalPrice, Cart.TotalQuant, Cart.ShippingMethod, Cart.ShippingCost, Cart.SalesTax, 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;"
Set RsCart = LaunConn.Execute(strSQL)
'Response.Write strSQL
If NOT RsCart.EOF Then
RsCart.MoveFirst
Do While Not RsCart.EOF
Response.Write ("")
Response.Write ("| Order Number: | " & RsCart("CartID") & " | ")
Response.Write ("Ordered On: | " & RsCart("OrderDate") & " | ")
Response.Write "Status: | " & RsCart("StatusName") &" | "
Response.Write ("| Special Instructions: | ")
Response.Write ("| ")
Response.write RsCart("SpecInst")
Response.Write (" | ")
Response.Write ("| Comments: | ")
Response.Write ("| ")
Response.write RsCart("comments")
Response.Write (" | ")
Response.Write (" ")
' Start the shopping cart table
Response.Write ""
Response.Write "| Part Number | "
Response.Write "Description | "
Response.Write "Quantity | "
Response.Write "Item Status | "
Response.Write "Price | "
' Start the form for updating the cart
'Response.Write " | " & RsCartItem("PartID") &" | "
Response.Write "" & RsCartItem("PartDesc") &" | "
' 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 "" & RsCartItem("Quantity") & " | "
if rscartitem("status") = " " then
Response.Write " | "
else
Response.Write "" & RsCartItem("Status") & " | "
end if
Response.Write "$" & formatnumber(RsCartItem("Price1"),2) &" " & QuantUpdate & " | "
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 "| | | | Price: | $" & formatnumber(RsCart("TotalPrice"),2) & " | "
Response.Write "| | | | Sales Tax: | $" & formatnumber(RsCart("SalesTax"),2) & " | "
Response.Write "| | | | Shipping: | $" & formatnumber(RsCart("ShippingCost"),2) & " | "
Response.Write "| | | | Total Price: | $" & formatnumber(RsCart("TotalPrice")+RsCart("SalesTax")+RsCart("ShippingCost"), 2) & " | "
Response.Write " "
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
|
|
|
|
|
|
|