Beginning the Checkout Process

The checkout process begins with the shipping page, which collects all necessary information required to ship the product. In the beginning of this checkout process for MyGolfGear.NET, we made a business rule that anyone who submits an order must first be registered with the site. If the user is not logged on, he cannot continue with the checkout process. Listing 15.1 shows the code necessary to implement this feature.

Listing 15.1. The Page_Load Method of ShippingInfo.aspx.cs
 ... private void Page_Load(object sender, System.EventArgs e) { // Make sure the user has logged in, before they proceed w/ checkout LoginInformation l = new LoginInformation(); int id = l.GetUserID( Request.ServerVariables["REMOTE_USER"] ...

Get Building e-Commerce Sites with the .NET Framework now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.