Chapter 5. Shopping basket and checkout
This chapter covers
- Order creation and processing
- Attributing auctions to customers
- Creating a shopping basket
- Collecting payment through PayPal
So far our booking application is missing a couple of very important aspects that any online retail system must have to complete orders. First, it’s missing the workflow that attributes an item—or in this case an auction—to a particular order for a particular customer. This notion of an order is something that was included in the original entity-relationship diagram (ERD) shown in figure 3.5 (in chapter 3). The order portion of the ERD is shown here in figure 5.1. It exists in the application already, but it currently does nothing.
To enable this workflow, we’ll utilize one of Lift’s lesser-known features called Machine to automatically assign expired auctions to the winning customer—the next time they load the shopping basket, they’ll see the completed auction ready for checkout.
Secondly, we’ll be building a checkout process to collect delivery information from customers. To implement this, we’ll be utilizing LiftScreen, Lift’s high-level abstraction on building forms and input screens.