I've written a few for the lists. RegEx based ones, logic tree ones, etc. The 
easiest way to do this is to write the rules up as 'plug-ins' for a CFIF and 
then go through them one by one to see which fits the criteria or not. 

>Has anyone written a cf-based rules engine type of thing? I have a client
>that has the wonkiest business rules for pricing products that I've ever
>seen. It's stuff like:
>this product is free if you live in Wisconsin, but priced and not subject to
>discounts if you don't
>this product is free unless you order 200 of them at once, then it's priced
>authors get their own products free, but only up until they've met their
>quota of products
>
>Stuff like that, and every time we talk they come up with another one. There
>are about a jillion discount options that are combinations of product and
>purchaser or product or purchaser.
>
>I _could_ put this all into a pricing CFC. But, then I'd be changing code
>every time they want to add a new product with another funky rule. So, I'm
>trying to come up with a more flexible approach. Thoughts?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:231735
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to