Project Description

The implementation in this chapter is a fairly basic shopping cart that allows you to add items, remove items, go through the checkout process, and view your orders. The example provides most of the basic functionality that is required for a shopping cart. Keep in mind, though, that it is not intended for production use but rather as a teaching aid. Also keep in mind that the cart does not actually link to a credit card verification service to process payments. That would be beyond the scope of the project. You would need to do a fair amount of further work to make this project into something that could be used in production.

In addition, this example does not include login, authentication, and session management; if you want a refresher on those topics, see Chapter 26, “Adding User Accounts to Your Website.” The example in this chapter is hard-coded to a user with a userid of customerA. Therefore, in places where the authenticated user would be, you’ll see customerA hard coded in the example.

The general logic flow of the example is as follows:

1. The root page contains a list of prints that can be purchased.

2. The user clicks a print to view details and add it to the cart. The user can add multiple items. The top link to the cart shows the number of items in the cart.

3. The user clicks the cart to see the items. The user can then change the quantity of items, remove items, continue shopping, or check out.

4. At checkout, the customer sees a shipping information page.

5. The customer then sees billing information, including the billing address and credit card data.

6. When the customer clicks to submit the billing information, a review of the validated transaction is displayed, and the user can select to make the final purchase.

7. After the user makes the final purchase, he or she sees a list of orders, including the recently completed one.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.149.27.29