Table coupons
From Zen Cart(tm) Wiki
{{Template::menuBarDevelopers}}
Contents
Description
The coupons table stores information about coupons you have created in:
- Zen Administration Area > Gift Certificate/Coupons > Coupon Admin
Columns
coupon_id
- int(11), auto-increment
- a unique identifier for this coupon
coupon_type
- char(1)
- F=
- P=
- G=
coupon_code
- varchar(32)
- the code which the customer must input to redeem the coupon
coupon_amount
- decimal(8,4)
- stores the value of the coupon (main currency)
coupon_minimum_order
- decimal(8,4)
- stores the amount the customer must have spent in order to redeem the coupon.
coupon_start_date
- datetime
- stores the date when then coupon becomes valid
coupon_end_date
- datetime
- stores the date when the coupon ceases to be valid
uses_per_coupon
- int(5)
- stores the number of times the coupon may be used
- 0 = unlimited
uses_per_user
- int(5)
- stores the number of times each user may use the coupon
- 0 = unlimited
restrict_to_products
- varchar(255)
- stores a string of product ids, separated by commas, which may have the coupon applied
restrict_to_customers
- varchar(255)
- stores a string of customer ids, separated by commas, which may use this coupon.
coupon_active
- char(1)
- a switch to make the coupon usable or not usable.
- Y = coupon is active/usable
- N = coupon is inactive/not usable
date_created
- datetime
- stores the date and time that a coupon was created.
- this value is automatically entered by zen when using the coupon manager
date_modified
- datetime
- stores the date and time of the last modification to the record.
- this value is automatically input by zen when using the coupon manager.