Chapter 5. Shopping basket and checkout

 

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.

Figure 5.1. The original Order and OrderAuction ERD table definitions

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.

Finally, no online shopping system would be complete without some mechanism to collect payment from users. To this end, we’ll be leveraging Lift’s built-in integration with PayPal, the online payment gateway.

5.1. Order creation

5.2. Implementing the basket and checkout process

5.3. Collecting payment with PayPal

5.4. Summary

sitemap