ok, my coupon/promotion module has become quite tricky...
a promotion can be valid for:
- any purchase
- a specific cart amount
- a specific product
- a specific product group (eg. jerseys)
the user may receive:
- a discount off their subtotal
- a FREE product (must be in the online catalogue)
what i have so far is the following tables...
promotions
----------------
promotion_id
promotion_uuid (unique code for purchaser to enter)
dateCreated
dateExpiry
promotion_title
promotion_criteria
-----------------
pc_id
pc_title (eg. Product Category, Product or Cart Value)
promotion_criteria_value
-----------------------
pcv_id
promotion_id
pc_id
pcv_value (eg. product ID 1, $300) INT
promotion_type
---------------
pt_id
pt_title (eg. Product, Discount)
promotion_type_value
---------------------
ptv_id
promotion_id
pt_id
ptv_value (eg. product ID 2, 30% discount) INT
have i tried to normalise this a bit too much ? am i missing anything at this stage.
any help would be appreciated.
mike