Adobe ColdFusion 8 Web Application Construction Kit, Volume 1: Getting Started
by Ben Forta, Raymond Camden, Charlie Arehart
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 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access