DiscountCouponTable
DiscountCouponTable class for handling table with discount coupons.
Class methods
Method | Description | Available from version |
---|---|---|
checkCoupon | Checks if coupon with this ID is unique within the complete product. | |
checkDiscountId | Checks that discount ID is more than zero. | |
couponManager | Returns methods for handling catalog coupons for coupon manager. No need to use the method independently. | |
getCouponTypes | Returns array of available coupon types. | |
getData | Returns array of coupon parameters or false when coupon was not found. No need to use the method independently. | |
getMap | Returns list of fields for table with discount coupons. | |
getTableName | Returns name for table with discount coupons. | |
isExist | Checks coupon existence. When coupon is available, returns array of its parameters, otherwise returns false. | |
onBeforeAdd | Default handler for the event onBeforeAdd . |
|
onBeforeUpdate | Default handler for the event onBeforeUpdate . |
|
saveApplied | Saves applied coupons. No need to use the method independently. | |
validateCoupon | Returns validator for the field COUPON (код купона). |
|
validateDiscountId | Returns validator for the field DISCOUNT_ID (discount code). |
Discount coupon fields
Field | Description | Type | Required |
---|---|---|---|
ID | Coupon ID. | Int | Да |
DISCOUNT_ID | Discount ID. | Int | Yes |
ACTIVE | Active state flag. | Char(1) | No |
COUPON | Coupon ID. | String | Yes |
DATE_APPLY | Applied coupon date. | Datetime | No |
ONE_TIME | Coupon type. | Char(1) | Yes |
TIMESTAMP_X | Coupon update date. | Datetime | No |
MODIFY_BY | Modified by. | Int | No |
DATE_CREATE | Created coupon date and time. | Datetime | No |
CREATED_BY | User ID who created coupon | Int | No |
DESCRIPTION | Coupon comment. | String | No |
© «Bitrix24», 2001-2024