Decorate dessign pattern?
On Wed, 23 Mar 2005 09:58:16 -0500, Jim McMullen <[EMAIL PROTECTED]> wrote: > > I have a typical CFC-based shopping cart (ShoppingCart object holds a struct > of CartItem objects). This works well and I have no real problem with it. > > However, I now need to implement a pretty robust coupon/discount > functionality into the app, and I can't seem to figure out how to do it. I > need to allow for four types of coupons: > > (1) Whole order coupon (NN% off entire order) > (2) Single item coupon (NN% off this item) > (3) Multiple item coupon (buy one (or two), get the 2nd (or third) NN% off) > (4) Free item coupon (buy this item, get a free toaster) > > I think I can figure out how to model a single coupon type, but as I'm an > OOP newb, figuring out how to model and implement the whole range has got my > head spinning. > > Can anyone point me in the right direction? > > Jim McMullen > Devlab, Inc. ---------------------------------------------------------- You > are subscribed to cfcdev. To unsubscribe, send an email to > [email protected] with the words 'unsubscribe cfcdev' as the subject of the > email. CFCDev is run by CFCZone (www.cfczone.org) and supported by > CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available > at www.mail-archive.com/[email protected] -- Xavi (http://xavicl.blogspot.com) ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
