• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Completing the Sale

To finish the customer's purchase, you need to find out where to send the merchandise and how he or she plans to pay for it. The collection of shipping and other contact information is handled by the form you see in Figure 16.6. The form is generated by the customerinfo.cfm script in Listing 16.6.

Listing 16.6. customerinfo.cfm—Collects Customer Information

<!---

    Online Store Case Study

    With the shopping cart finalized, this script collects
    contact and shipping information from the customer. The
    <cfform> and <cfinput> tags are used to incorporate
    JavaScript that enforces required
    fields.

--->

<html>

<head>
<title>Checkout Counter</title>
</head>

<body>

<h1>Checkout Counter</h1>

<h2>Step 2 of 3: Customer Delivery Information</h2>

<p>Please enter the delivery information requested below:</p>

<table cellpadding="6">

<cfform action="cardinfo.cfm" method="post">

<tr>
<td><b>First Name:</b></td>
<td><cfinput type="text" name="fName" size="30" required="yes"
message="Please enter your first name before continuing to the
next step."></td>
</tr>

<tr>
<td><b>Last Name:</b></td>
<td><cfinput type="text" name="lName" size="30" required="yes"
message="Please enter your last name before continuing to the
next step."></td>
</tr>

<tr>
<td><b>Street Address:</b></td>
<td><cfinput type="text" name="address" size="30" required="yes"
message="Please enter your street address before continuing to
the next step."></td>
</tr>

<tr>
<td><b>City:</b></td>
<td><cfinput type="text" name="city" size="30" required="yes"
message="Please enter your city before continuing to the next
step."></td>
</tr>

<tr>
<td><b>State:</b></td>
<td><cfinput type="text" name="state" size="2" required="yes"
message="Please enter your state before continuing to the next
step."></td>
</tr>

<tr>
<td><b>Zip Code:</b></td>
<td><cfinput type="text" name="zip" size="10" required="yes"
message="Please enter your Zip Code before continuing to the
next step."></td>
</tr>

<tr>
<td><b>Daytime Phone:</b></td>
<td>
<cfinput type="text" name="dayphone1" size="3" maxlength="3"
required="yes" message="Please enter your daytime phone number
before continuing to the next step.">-
<cfinput type="text" name="dayphone2" size="3" maxlength="3"
required="yes" message="Please enter your daytime phone number
before continuing to the next step.">-
<cfinput type="text" name="dayphone3" size="4" maxlength="4"
required="yes" message="Please enter your daytime phone number
before continuing to the next step.">
</td>
</tr>

<tr>
<td><b>Evening Phone:</b></td>
<td>
<cfinput type="text" name="evephone1" size="3" maxlength="3"
required="yes" message="Please enter your evening phone number
before continuing to the next step.">-
<cfinput type="text" name="evephone2" size="3" maxlength="3"
required="yes" message="Please enter your evening phone number
before continuing to the next step.">-
<cfinput type="text" name="evephone3" size="4" maxlength="4"
required="yes" message="Please enter your evening phone number
before continuing to the next step.">
</td>
</tr>

<tr>
<td><b>E-mail Address:</b></td>
<td><cfinput type="text" name="email" size="30" required="yes"
message="Please enter your email address before continuing to
the next step."></td>
</tr>

<tr>
<td colspan="2"><input type="submit" value="Continue Checkout"></td>
</tr>

</cfform>

</table>

</body>

</html>


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint