Laundry Carts
<%
Dim CartsConn
Dim CartsDB
Set CartsConn=Server.CreateObject("ADODB.Connection")
CartsConn.Open "DSN=LaundryCarts;"
Dim CookCartID
CookCartID = Session("CookCartID")
CustID = Session("CustID")
%>
Checkout - Billing Information
<%
If Request.Form("ShippingMethod") <> "" Then
Session("ShippingMethod") = Request.Form("ShippingMethod")
Session("ShippingCost") = Request.Form(Session("ShippingMethod"))
End If
Dim shipping
shipping = cCur(Session("ShippingCost"))
shiptext = Session("ShippingCost")
%>
Part Number
Description
Quantity
Price
Total
<%
strSQL = "SELECT CartID, PartID, IDCateg, Quantity, Price, PartDesc, Weight, Quantity * Price AS Price1 FROM CartItems WHERE CartID LIKE '" & CookCartID & "'"
Set CartsDB = CartsConn.Execute(strSQL)
Weight = 0
CARTs = 0
Shipcost1 = 0
Shipcost2 = 0
If Not CartsDB.EOF Then
Do While NOT CartsDB.EOF
PartID = CartsDB("PartID")
PartDesc = CartsDB("PartDesc")
Quantity = CartsDB("Quantity")
Price = CartsDB("Price")
Price1 = CartsDB("Price1")
WeightD = CartsDB("Weight")
Weight = Weight + (Quantity * WeightD)
Response.Write "
" & PartID &"
"
Response.Write "
" & PartDesc &"
"
Response.Write "
"
Response.Write "
"
Response.Write "
$" & formatnumber(Price,2) & "
"
Response.Write "
$" & formatnumber(Price1,2) & "
"
'Cart Flat Rate Shipping
If PartID = "JRCART" OR PartID = "BIGCART" Then
CARTS = CARTS + Quantity
End If
CartsDB.MoveNext
Loop
CartsDB.Close
Set CartsDB = Nothing
Session("Weight") = Weight
Else
%>
No products added yet!
<%
End If
strSQL = "SELECT TotalQuant, TotalPrice FROM Cart WHERE CartID LIKE '" & CookCartID & "'"
Set CartsDB = CartsConn.Execute(strSQL)
If Session("SalesTax") > 0 Then
Response.Write "
"
Session("ShippingCost") = shiptext
CartsDB.Close
Set CartsDB = Nothing
CartsConn.Close
Set CartsConn = Nothing
If Session("BFirstName") = "" Then
Session("BFirstName") = Session("SFirstName")
End If
If Session("BLastName") = "" Then
Session("BLastName") = Session("SLastName")
End If
If Session("BBusiness") = "" Then
Session("BBusiness") = Session("SBusiness")
End If
If Session("BAddress1") = "" Then
Session("BAddress1") = Session("SAddress1")
End If
If Session("BAddress2") = "" Then
Session("BAddress2") = Session("SAddress2")
End If
If Session("BCity") = "" Then
Session("BCity") = Session("SCity")
End If
If Session("BState") = "" Then
Session("BState") = Session("SState")
End If
If Session("BZip") = "" Then
Session("BZip") = Session("SZip")
End If
If Session("BPhone") = "" Then
Session("BPhone") = Session("SPhone")
End If
%>