September 2007
Intermediate to advanced
600 pages
20h 21m
English
The examples in this chapter assume that all items in the Merchandise table are always available for sale. Orange Whip Studios might not need to be concerned about its merchandise ever selling out, but your company probably does. At a minimum, you should probably add an InStock Boolean field to the Merchandise table and ensure that users can’t add items to their carts unless the InStock field is 1. More sophisticated applications might call for maintaining a NumberOnHand field for each item, which gets decremented each time an item is ordered and incremented each time new shipments come in from the supplier.
Read now
Unlock full access