Table coupons

From Zen Cart(tm) Wiki
Revision as of 04:34, 24 November 2006 by DrByte (talk | contribs) (1.3.6)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Database Version

1.3.6


Description

Stores information about coupons that have been created.


Table Details

Primary Key

coupon_id

Indexed Fields

coupon_active
coupon_type
coupon_code

Columns

coupon_id Primary Key

A unique, auto incremented value, to identify each coupon record.
Type: int(11)
Null: No
Default:
Extra: auto_increment


coupon_type Index

The type of coupon/gift voucher. Can be set to F (fixed discount coupon), P (percentage off discount coupon) or G (gift voucher).
Type: char(1)
Null: No
Default: F


coupon_code Index

The code which the customer must input to redeem the coupon/gift voucher.
Type: varchar(32)
Null: No
Default:


coupon_amount

The value of the coupon in the main currency.
Type: decimal(15,4)
Null: No
Default: 0.0000


coupon_minimum_order

The minimum amount the customer must spend in order to redeem the coupon.
Type: decimal(15,4)
Null: No
Default: 0.0000


coupon_start_date

The date and time when the coupon becomes valid.
Type: datetime
Null: No
Default: 0001-01-01 00:00:00


coupon_expire_date

The date and time that the coupon ceases to be valid.
Type: datetime
Null: No
Default: 0001-01-01 00:00:00


uses_per_coupon

The maximum number of times the coupon may be used (0 = unlimited).
Type: int(5)
Null: No
Default: 1


uses_per_user

The number of times each customer may use the coupon (0 = unlimited).
Type: int(5)
Null: No
Default: 0


restrict_to_products

A string of product ids, separated by commas, which may have the coupon applied to.
Type: varchar(255)
Null: Yes
Default: NULL


restrict_to_categories

A string of category ids, separated by commas, which may have the coupon applied to.
Type: varchar(255)
Null: Yes
Default: NULL


restrict_to_customers

A string of customer ids, separated by commas, which may use this coupon.
Type: text
Null: Yes
Default: NULL


coupon_active Index

Is the coupon active? Can be set to N (no) or Y (yes).
Type: char(1)
Null: No
Default: Y


date_created

The date and time that the coupon was created.
Type: datetime
Null: No
Default: 0001-01-01 00:00:00


date_modified

The date and time of the last modification of the record.
Type: datetime
Null: No
Default: 0001-01-01 00:00:00

coupon_zone_restriction

The zone_id to which this coupon is restricted for use.
Type: integer
Null: No
Default: 0


Default Entries

None.