Overview of the E-Commerce Application


In this chapter, we build the ASP.NET Beer Store. The e-commerce application is loaded with sample data that represents beer product information (see Figure 34.1).

Figure 34.1. Home page of the ASP.NET Beer Store.


Note

The sample images used for the ASP.NET Beer Store were generously provided by Nathan Wiger and Corey Gray, the world-renowned experts on all excellent forms of beer. Visit their website at www.BeerLabels.com.


Before we get into the technical details of how the application works, I want to provide you with an overview of the different parts of the application. This application has two halves: The half that the world sees and the half that the store administrators see.

The public half of the ASP.NET Beer Store consists of the following ASP.NET pages:

  • Default.aspx The home page of the ASP.NET Beer Store. This page displays a list of featured products.

  • Products.aspx This page displays a list of products contained in a particular product category. If the category contains sub-categories, the sub-categories are also displayed.

  • ProductDetails.aspx This page displays details for a particular product. It also contains a link for adding a product to a shopping cart.

  • ShoppingCart.aspx This page displays a customer shopping cart. Customers can use this page to edit the items in their shopping carts.

  • CheckOut\Default.aspx This page enables customers to enter billing and shipping information and purchase the products in their shopping carts.

  • CheckOut\Confirmation.aspx This page displays an order confirmation number after a customer has placed an order.

  • ContactInfo.aspx This page displays contact information for the store.

  • Login.aspx This page enables an existing customer to log in or a new customer to register.

  • PasswordReminder.aspx This page enables customers to reset their passwords when they have forgotten their original passwords.

When you request the home page of the application, a list of featured products is displayed. Every page in the application also displays a list of product categories in a menu in the left column.

If you navigate to a product category, then you arrive at the Products.aspx page. This page displays a list of products contained in the category in a DataList control (see Figure 34.2). Next to each product description, a View Details link is rendered. If you click the View Details link, then you arrive at the ProductDetails.aspx page.

Figure 34.2. The Products.aspx page.


The ProductDetails.aspx page displays information on a particular product. You can click the Add to Cart link to add the product to your shopping cart.

You can view the contents of your shopping cart by clicking the Shopping Cart menu link that appears at the top of any page. The shopping cart is displayed by the ShoppingCart.aspx page. This page enables you to remove items from the shopping cart. It also includes a Check Out link (see Figure 34.3).

Figure 34.3. The ShoppingCart.aspx page.


If you click the Check Out link, and you are not authenticated, then you arrive at the Login.aspx page. This page enables existing customers to log in and new users to register. After you log in or register, you are redirected to the CheckOut\Default.aspx page (see Figure 34.4).

Figure 34.4. The check out page.


The CheckOut\Default.aspx page contains a form that enables a customer to enter credit card information, billing address, and shipping address. When the customer submits the form, the shopping cart associated with the customer is converted into a new product order.

The private section of the application is no less important. A store manager uses this section to list new products and view customer orders. The private half of the ASP.NET Beer Store consists of the following pages:

  • Manage\Default.aspx Contains a list of links to other pages in the store management section.

  • Manage\Categories\Default.aspx This page enables store managers to create new product categories and edit existing product categories.

  • Manage\Products\Default.aspx This page enables store managers to list new products and edit existing products.

  • Manage\Orders\Default.aspx This page enables store managers to view customer product orders.

When the ASP.NET Beer Store first starts, an administrator role and user is created automatically. The role is named StoreAdmins and the user is named Admin. The Admin user has the password secret.

If you login with the Admin account, then an additional menu item labeled Manage appears at the top of every page. If you click the Manage link, then you are brought to the Manage\Default.aspx page. This page displays a menu of management options.

Warning

Make sure that you modify the Admin password. Everyone who reads this book knows that the Admin password defaults to secret. You can modify the Admin password by opening the Web Site Administration Tool when the application is loaded in Visual Web Developer. Launch this tool by selecting the menu option Website, ASP.NET Configuration.


If you navigate to the Manage\Categories\Default.aspx page, then you can add, delete, and edit product categories. The hierarchy of current product categories is displayed in a treeView control. Child categories of the selected category in the TReeView are displayed in a GridView control. If you click the Add Category link, a floating virtual window appears that enables you to add a new product category (see Figure 34.5).

Figure 34.5. Adding a product category.


The Manage\Products\Default.aspx page enables you to add, delete, and edit products. The list of current products is displayed in a GridView control. If you click the Add New Product link, a new floating virtual window appears that contains a form for entering a new product (see Figure 34.6).

Figure 34.6. Adding a new product.


The Manage\Orders\Default.aspx page displays a list of product orders. This page doesn't display any product orders until a customer submits a shopping cart. You can click the Select link next to any order to view detailed order information, including the customer credit card information, billing address, and shipping address (see Figure 34.7).

Figure 34.7. Viewing customer orders.





ASP. NET 2.0 Unleashed
ASP.NET 2.0 Unleashed
ISBN: 0672328232
EAN: 2147483647
Year: 2006
Pages: 276

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net