Processing a Complete Order

In addition to explaining how to build commerce applications, this chapter emphasizes the benefits of hiding the mechanics of complex operations within goal-oriented Custom Tag wrappers that can accomplish whole tasks on their own. Actual page templates that use these Custom Tags look very clean, since they deal only with the larger concepts at hand rather than including a lot of low-level code. That’s the difference, for instance, between the two versions of the StoreCart.cfm template (Listings 22.4 and 22.6).

In keeping with that notion, Listing 22.11 creates another Custom Tag, called <cf_PlaceOrder>. This tag is in charge of handling all aspects of accepting a new order from a customer, including:

  • Inserting a ...

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.