We complete our description of the
shopping components of the winestore by outlining the ordering and
shipping modules in this chapter. The ordering module manages the
conversion of the shopping cart discussed in Chapter 11 to an order. The module manages the most
complex database interactions in the winestore and includes locking
to address concurrency problems. The shipping module consists of two
receipts: an email receipt that shows how the PHP
function is used in practice and an
that is similar to the customer receipt in Chapter 10.
This chapter is the third of four that outline the complete winestore application. As in the previous two chapters, we emphasize that the scripts aren’t a production system but an illustration of web database application practice. We encourage use of the scripts for any purpose and suggest that the best method to understand the scripts is to view, edit, and use them while reading the chapter. We also emphasize that the descriptions in this chapter are outlines and that a full understanding of the scripts requires reading and using the code.
The scripts discussed in this chapter perform the following functions:
Convert a shopping cart in the items and orders tables to an order and manage the sale of wine through the inventory table
Send a confirmation email to the user
Complete the ordering process with an HTML receipt that avoids ...