<% Response.Buffer = True %> <% Response.Expires = -1 %> <% Dim strUrl If strUseSecure = "Yes" Then strUrl = strSecureUrl Else strUrl = strCoUrl End If Dim strCartId strCartId = Request("CartId") Dim strEmail strEmail = trim(Request("Email")) Dim strPWD strPWD = Request("PWD") DIM sqlCartCheck, objRSCartCheck sqlCartCheck = "SELECT * FROM Orders Where OrderNumber='" & strCartId & "'" Set objRSCartCheck = Server.CreateObject("ADODB.Recordset") objRSCartCheck.Open sqlCartCheck, objConn If objRSCartCheck.EOF Then Else Dim strUpdateCartId strUpdateCartId = strCartId + 1 Response.Cookies("CartId")("CartId") = strUpdateCartID Response.Cookies("CartdId").Expires = Now() + 9999 objConn.Execute "Update Cart Set CartId='"& strUpdateCartID &"' Where CartId='"& strCartId &"'" Response.Redirect "paypal_verify.asp?CartId=" & strUpdateCartId & "&Email=" & strEmail & "&PWD=" & strPWD End If DIM mySQL, objRS mySQL = "SELECT * FROM Customers Where Email='"& strEmail &"' And PWD='" & strPWD & "'" Set objRS = Server.CreateObject("ADODB.Recordset") objRS.Open mySQL, objConn IF objRS.EOF THEN Response.Redirect "send_pwd.asp?CartId=" & strCartId Response.End Else Session("CustEmail") = Request("Email") Session("CustPWD") = Request("PWD") Session("CustFName") = objRS("FName") Session("CartId") = strCartId Response.Cookies("CustLogin")("CustEmail") = strEmail Response.Cookies("CustLogin")("CustPWD") = strPWD END IF DIM strCustNumber strCustNumber = objRS("CustNumber") Dim strFName strFName = objRS("FName") Dim strMName strMName = objRS("MName") Dim strLName strLName = objRS("LName") DIM strCoName strCoName = objRS("CoName") Dim strAddress strAddress = objRS("Address") Dim strAddress2 strAddress2 = objRS("Address2") Dim strCity strCity = objRS("City") Dim strState strState = objRS("State") Dim strZipCode strZipCode = objRS("ZipCode") Dim strCountry strCountry = objRS("Country") Dim strCountryCode strCountryCode = objRS("CountryCode") Dim strAreaCode strAreaCode = objRS("AreaCode") Dim strPhoneEx strPhoneEx = objRS("PhoneEx") Dim strPhoneNum strPhoneNum = objRS("PhoneNum") Dim strAreaCode2 strAreaCode2 = objRS("AreaCode2") Dim strPhoneEx2 strPhoneEx2 = objRS("PhoneEx2") Dim strPhoneNum2 strPhoneNum2 = objRS("PhoneNum2") Dim strInternationalPhone strInternationalPhone = objRS("InternationalPhone") 'Shipping Info Dim strFirstLetter,strLetterCase Dim strShipAlternate strShipAlternate = Request.Form("ShipAlternate") Dim strShipFName strShipFName = trim(Request.Form("ShipFName")) strShipFName = Replace(strShipFName,Chr(039),"") strShipFName = Replace(strShipFName,Chr(034),"") strFirstLetter = Left(strShipFName,1) strLetterCase = Ucase (strFirstLetter) strShipFName = Replace(strShipFName,strFirstLetter,strLetterCase,1,1) Dim strShipLName strShipLName = trim(Request.Form("ShipLName")) strShipLName = Replace(strShipLName,Chr(039),"") strShipLName = Replace(strShipLName,Chr(034),"") strFirstLetter = Left(strShipLName,1) strLetterCase = Ucase (strFirstLetter) strShipLName = Replace(strShipLName,strFirstLetter,strLetterCase,1,1) Dim strShipCoName strShipCoName = trim(Request.Form("ShipCoName")) strShipCoName = Replace(strShipCoName,Chr(039),"") strShipCoName = Replace(strShipCoName,Chr(034),"") strFirstLetter = Left(strShipCoName,1) strLetterCase = Ucase (strFirstLetter) strShipCoName = Replace(strShipCoName,strFirstLetter,strLetterCase,1,1) Dim strShipAddress strShipAddress = trim(Request.Form("ShipAddress")) strShipAddress = Replace(strShipAddress,Chr(039),"") strShipAddress = Replace(strShipAddress,Chr(034),"") strFirstLetter = Left(strShipAddress,1) strLetterCase = Ucase (strFirstLetter) strShipAddress = Replace(strShipAddress,strFirstLetter,strLetterCase,1,1) Dim strShipAddress2 strShipAddress2 = trim(Request.Form("ShipAddress2")) strShipAddress2 = Replace(strShipAddress2,Chr(039),"") strShipAddress2 = Replace(strShipAddress2,Chr(034),"") strFirstLetter = Left(strShipAddress2,1) strLetterCase = Ucase (strFirstLetter) strShipAddress2 = Replace(strShipAddress2,strFirstLetter,strLetterCase,1,1) Dim strShipCity strShipCity = trim(Request.Form("ShipCity")) strShipCity = Replace(strShipCity,Chr(039),"") strShipCity = Replace(strShipCity,Chr(034),"") strFirstLetter = Left(strShipCity,1) strLetterCase = Ucase (strFirstLetter) strShipCity = Replace(strShipCity,strFirstLetter,strLetterCase,1,1) Dim strShipState strShipState = Request.Form("ShipState") Dim strShipZipCode strShipZipCode = trim(Request.Form("ShipZipCode")) If strShipAlternate = "Yes" Then Dim strArrayCountry strArrayCountry = split(Request.Form("ShipCountry"), ":", -1) strShipCountryCode = strArrayCountry(0) strShipCountry = strArrayCountry(1) End If If Request.Form("B1") <> "" And Request.Form("ShipAlternate") = "No" Then Response.Redirect "error.asp?Error=You must choose Yes to alternate address if you use the Alternate Address Button." Response.End End If If strShipAlternate = "Yes" Then If Request.Form("ShipFName") = "" Then Response.Redirect "error.asp?Error=You must enter a First Name in the shipping area if you choose Yes to alternate address." Response.End ElseIf Request.Form("ShipLName") = "" Then Response.Redirect "error.asp?Error=You must enter a Last Name in the shipping area if you choose Yes to alternate address." Response.End ElseIf Request.Form("ShipAddress") = "" Then Response.Redirect "error.asp?Error=You must enter an Address in the shipping area if you choose Yes to alternate address." Response.End ElseIf Request.Form("ShipCity") = "" Then Response.Redirect "error.asp?Error=You must enter a City, Town or Province in the shipping area if you choose Yes to alternate address." Response.End ElseIf Request.Form("ShipState") = "Select State" Then Response.Redirect "error.asp?Error=You must enter a State in the shipping area if you choose Yes to alternate address." Response.End ElseIf Request.Form("ShipZipCode") = "" Then Response.Redirect "error.asp?Error=You must enter a Postal Code in the shipping area if you choose Yes to alternate address." Response.End End If End If DIM mySQL2, objRS2 Set objRS2 = Server.CreateObject("ADODB.Recordset") mySQL2 = "SELECT * FROM Cart Where CartId ='"& strCartId & "' Order By ListNum" objRS2.Open mySQL2, objConn %> Customer Verify text="#<%= strText %>" link="#<%= strLink %>" vlink="#<%= strVLink %>" alink="#<%= strALink %>">

<%=objRS("FName")%>,
Please verify your account information below.


Account Information

Account Number: <%= strCustNumber %>

<%= strFName %> <%= strMName %> <%= strLName %>

<%= strCoName %>

<%= strAddress %>

<%= strAddress2 %>

<% If (strCountryCode = "US") Then %>

<%= strCity %>, <%= strState %> <%= strZipCode %>

<%= strCountry %>

<% Else %>

<%= strCity %> <%= strZipCode %>

<%= strCountry %> (<%= strCountryCode %>)

<% End If %>

<%= strEmail %>

<% If (strPhoneEx <> "") Then %>

<%= strAreaCode %>-<%= strPhoneEx %>-<%= strPhoneNum %>

<% End If %> <% If (strPhoneEx2 <> "") Then %>

<%= strAreaCode2 %>-<%= strPhoneEx2 %>-<%= strPhoneNum2 %>

<% End If %> <% If (strInternationalPhone <> "") Then %>

<%= strInternationalPhone %>

<% End If %>
Update Account Info Here
<% IF objRS2.EOF THEN Response.Write "Your shopping cart is empty.

" Response.Write "Customer Home Page
" Response.End Else %>
<% Dim strOpt1 Dim strOpt2 Dim strOpt3 DO WHILE NOT objRS2.EOF If objRS2("Opt1") = "0" Then strOpt1 = "" Else strOpt1 = objRS2("Opt1") End If If objRS2("Opt2") = "0" Then strOpt2 = "" Else strOpt2 = objRS2("Opt2") End If If objRS2("Opt3") = "0" Then strOpt3 = "" Else strOpt3 = objRS2("Opt3") End If %> <% objRS2.MoveNext Loop %> <% End If %>

Item #

Quantity

Options

Description

Each

Amount

<%=objRS2("ItemNum")%> <%=objRS2("Quantity")%> <%= strOpt1 %> <%= strOpt2 %> <%= strOpt3 %> <%=objRS2("Description")%> <%= strCurrencySymbol %><%= FormatNumber(objRS2("Price"),2)%> <%= strCurrencySymbol %><%= FormatNumber(objRS2("Price") * objRS2("Quantity"),2) %>
<% Dim strUPSServiceCode, strShipping, strShippingType If strShippingMethod = "FlatRate" Then DIM mySQL3, objRS3 Set objRS3 = Server.CreateObject("ADODB.Recordset") mySQL3 = "SELECT SUM(FlatRate) AS TotalShipping FROM Cart Where CartId = '"& strCartId &"'" objRS3.Open mySQL3, objConn strShipping = objRS3("TotalShipping") ElseIf strShippingMethod = "UPS" Then Dim strArrayVal strArrayVal = split(Request.Form("UPSShippingRate"), ",", -1) strUPSServiceCode = strArrayVal(0) strShipping = strArrayVal(1) strShippingType = strArrayVal(2) End If Dim strMyTaxRate If strTaxItems = "Yes" Then If strCoCountryCode = "US" Then If strTaxLocalOnly = "Yes" Then If strState = strCoState Then strMyTaxRate = strTaxRate Else strMyTaxRate = 0.00 End If Else strMyTaxRate = strTaxRate End If Else ' Else not usa then some other country If strTaxCountryOnly = "Yes" Then If strCountryCode = strCoCountryCode Then strMyTaxRate = strTaxRate Else strMyTaxRate = 0.00 End If Else strMyTaxRate = strTaxRate End If End If Else strMyTaxRate = 0.00 End If DIM mySQL1, objRS1 Set objRS1 = Server.CreateObject("ADODB.Recordset") mySQL1 = "SELECT SUM(ItemTotal) AS CartTotal FROM Cart Where CartID = '"& strCartId &"' And Taxable = 'Yes'" objRS1.Open mySQL1, objConn DIM mySQL4, objRS4 Set objRS4 = Server.CreateObject("ADODB.Recordset") mySQL4 = "SELECT SUM(ItemTotal) AS NoTaxTotal FROM Cart Where CartID = '"& strCartId &"' And Taxable = 'No'" objRS4.Open mySQL4, objConn Dim strNoTaxTotal strNoTaxTotal = objRS4("NoTaxTotal") If NOT IsNumeric(strNoTaxTotal) Then strNoTaxTotal = 0.00 End If Dim strCartTotal strCartTotal = objRS1("CartTotal") If NOT IsNumeric(strCartTotal) Then strCartTotal = 0.00 End If Dim strTaxTotal strTaxTotal = Abs(strCartTotal) * strMyTaxRate strCartTotal = Abs(strCartTotal) + Abs(strNoTaxTotal) Dim strOrderTotal strOrderTotal = Abs(strShipping) + Abs(strTaxTotal) + Abs(strCartTotal) %>

Subtotal:

VAT:

<%If strShippingMethod = "UPS" Then: Response.Write strShippingType & " ": End If%>Shipping:

Total:

<%= strCurrencySymbol %><%= FormatNumber(strCartTotal,2)%> <%= strCurrencyCode %>

<%= strCurrencySymbol %><%= FormatNumber(strTaxTotal,2)%> <%= strCurrencyCode %>

<%= strCurrencySymbol %><%= FormatNumber(strShipping,2)%> <%= strCurrencyCode %>

<%= strCurrencySymbol %><%= FormatNumber(strOrderTotal,2)%> <%= strCurrencyCode %>


Disclaimer

I have read the Disclaimer and I agree with all Terms and Conditions. (must be checked to continue)

<% objRS.Close Set objRS = Nothing objConn.Close Set objConn = Nothing %>