[ic] Discount Specifications

Marty Tennison marty at dripdepot.com
Wed Nov 17 17:16:01 UTC 2010

Starting a new thread for discount specs....

I just got done implementing this in our system so it's fresh in my mind.  If 
this is something anyone is interested in I'll be happy to elaborate and/or 
collaborate on the spec and share my experiences. 


Discounts have 3 major parts. 
  1) Discounts
  2) Rules
  3) Actions

Discounts have one or more rules.
Discounts have one or more actions.
Discounts can be active or inactive

Rules evaluate conditions and return 1 or 0  (true or false)
Rules have a type, operator, value. 
Rule types are actually modules (subs) that can be plugged in as new rules are 
Rule types: (ideas)
  1) Subtotal including discounts
  2) Subtotal excluding discounts
  3) n
  4) date
  5) Weight of all
  6) username
  7) sku 
  8) cart contains X of item Y
  9) was discount code entered by user (make this a private coupon)
Rule operators:
  1) ==, !=, <=, >=, <, >, eq, ne, ge, le, gt, lt, <user defined input>
Rule Values:
  1)<user defined input> (this is what we test against)
Rules chain unless the rule returns false
If all rules return true then the discount actions are applied.

Actions have a type, operator and value
Action types are actually modules (subs) that can be plugged in as new actions 
are needed
Action types: (ideas)
  1) Percentage of subtotal
  2) Fixed amount
  3) Free Shipping
  4) Discount sku by fixed amount
  5) Discount sku by percentage
  6) Discount sku by (amt * qty)
  7) Display message
  8) Log something
  9) Deactivate discount (make discount a single use coupon)
Action Operator:
  1) (only used to enter SKU if needed for item 4,5,6 above)
Action Values:
  <user defined input>  ie: .65, 5 etc...

  All redeemed discounts should be logged to a file for reporting.
  Logged fields should be 
  1) Discount ID
  2) Username
  3) Date
  4) Amount
  5) Order number

- - -- ---- ---------------------------------------------------- --- -- - -
Marty Tennison                                                Drip Depot Inc 
web: www.dripdepot.com
- -- --- ---------------------------------------------------------- --- --

More information about the interchange-users mailing list