Chapter 10. E-commerce Store

In this chapter, you implement a working e-commerce store for TheBeerHouse to enable users to shop for mugs, T-shirts, and other gadgets for beer fanatics. This again gives you the opportunity to implement a good model and controller that wraps and abstracts the database objects as well as a highly responsive user interface that is afforded to you by using the MVC framework. You also drill down into e-commerce-specific design and coding issues as you implement a persistent shopping cart, and you integrate a third-party payment processor service to support real-time credit card transactions. At the end of this chapter you will have a complete e-commerce module that you can easily adapt to suit your own needs.

Problem

Let's assume the site's owner wants you to implement some features to help him turn the site into a profit-making enterprise. You have a number of ways to do this: some sites gain revenue from renting advertising space (boxes and banners), some sell subscription-based access to their special content (articles, support forums, downloads, and so on), and some set up an e-commerce store for selling goods online. This chapter covers the design and implementation of an e-commerce store. This option was chosen for the demo website because it's a good example of non-trivial design and coding, and it gives you a chance to examine some additional ASP.NET 3.5 technology in a real-world scenario. In addition, it is much more common for small sites to ...

Get ASP.NET MVC 1.0 Website Programming: Problem – Design – Solution 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.