Saturday, July 13, 2013

Rule Triggers

Example of a "rule trigger" (which I believe muddies code when placed inline, which is why we need standard rules engines?)

Being a member of "Halloween Sale" does not mean that the item is always on sale. The "rule trigger" should also take into account the date. Example:
  HALLOWEEN = 18   // See example tables above
  if memberOf(item,HALLOWEEN) and month(today()) = "October" then
    item.price = item.price * 0.9
  end if
http://www.geocities.com/tablizer/sets1.htm

No comments:

Post a Comment