Inventory Tracking

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.

Get Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started 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.