iisCART Documentation | ![]() |
iisCART CHECKOUT.ASP |
CheckOut.asp Source |
<% Set Cart = Session("Cart") If Request("Save") <> "" Then ErrString = Cart.AcceptShippingInfo if ErrString = "" Then Response.Redirect "ShowTotal.asp" End If %> <HTML> <HEAD> <TITLE>Check out</TITLE> </HEAD> <body link="#000000" bgcolor="#57C4D2" vlink="#000000" alink="#FFFFFF"> <CENTER> <H1>Your Order</H1> <% Cart.DisplayCartReadOnly "item id, description" %> <%' Put custom validation here %> <% If ErrString <> "" Then %> <FONT COLOR="#FF0000" FACE="Tahoma" SIZE=5>The following fields are required: <% = ErrString %></FONT> <% End If %> <FORM ACTION="CheckOut.asp" METHOD=POST> <H1>Shipping Information</H1> <TABLE CELLPADDING=0> <TR><TD>Name *</TD><TD><INPUT TYPE=TEXT NAME=SHIPNAME VALUE="<% = Cart.Info.ShipName %>"></TD></TR> <TR><TD>Company</TD><TD><INPUT TYPE=TEXT NAME=SHIPCOMPANY VALUE="<% = Cart.Info.ShipCompany %>"></TD></TR> <TR><TD>Address 1 *</TD><TD><INPUT TYPE=TEXT NAME=SHIPADDRESS1 VALUE="<% = Cart.Info.ShipAddress1 %>"></TD></TR> <TR><TD>Address 2</TD><TD><INPUT TYPE=TEXT NAME=SHIPADDRESS2 VALUE="<% = Cart.Info.ShipAddress2 %>"></TD></TR> <TR><TD>Address 3</TD><TD><INPUT TYPE=TEXT NAME=SHIPADDRESS3 VALUE="<% = Cart.Info.ShipAddress3 %>"></TD></TR> <TR><TD>City *</TD><TD><INPUT TYPE=TEXT NAME=SHIPCITY VALUE="<% = Cart.Info.ShipCity %>"></TD></TR> <TR><TD>State/Province</TD><TD><INPUT TYPE=TEXT NAME=SHIPSTATEPROVINCE VALUE="<% = Cart.Info.ShipStateProvince %>"></TD></TR> <TR><TD>Zip/Postal *</TD><TD><INPUT TYPE=TEXT NAME=SHIPZIPPOSTAL VALUE="<% = Cart.Info.ShipZipPostal %>"></TD></TR> <TR><TD>Country *</TD><TD><INPUT TYPE=TEXT NAME=SHIPCOUNTRY VALUE="<% = Cart.Info.ShipCountry %>"></TD></TR> <TR><TD>Email</TD><TD><INPUT TYPE=TEXT NAME=SHIPEMAIL VALUE="<% = Cart.Info.ShipEmail %>"></TD></TR> </TABLE> <P> <TR><TD>Check this box if billing address is the same as shipping</TD><TD><INPUT TYPE=CHECKBOX NAME=BILLINGSAMEASSHIPPING <% If Cart.Info.BillingSameAsShipping Then Response.Write "CHECKED"%>></TD></TR> <P> Check here if are you a resident of California:<INPUT TYPE=CHECKBOX NAME=STATERESIDENT <% If Cart.Info.IsStateResident Then Response.Write "CHECKED"%>> <P> Shipping by <SELECT NAME=SHIPPING> <OPTION VALUE="US Mail:3.95" SELECTED>US Regular Mail</OPTION> <OPTION VALUE="Priority Mail:3.95;8.00">US Priority Mail</OPTION> <OPTION VALUE="DHL:5.95;12.00">DHL</OPTION> <OPTION VALUE="Airborne Express:6.95;10.00">Airporne Express</OPTION> </SELECT> <P> <INPUT TYPE=SUBMIT NAME=Save VALUE="Save Info"> </FORM> </CENTER> </BODY> </HTML> |
Methods / Properties / Objects used: |
Cart.AcceptShippingInfo Cart.DisplayCartReadOnly Cart.Info In addition the component looks for a submission with the name SHIPPING for built in shipping calculation. |
Description / Comments: |
CheckOut.asp first displays a read-only version of the cart by calling the DisplayCartReadOnly property. It then collect shipping information for subsequent storage in the database. In addition, it allows the user to select a shipping type. After saving the information showtotal.asp is displayed. |
© Corporate Web Solutions 1998, 1999. | ![]() |