Documentation

DiscountCouponTable

DiscountCouponTable class for handling table with discount coupons.

Class methods

MethodDescription Available from version
checkCouponChecks if coupon with this ID is unique within the complete product.
checkDiscountIdChecks that discount ID is more than zero.
couponManagerReturns methods for handling catalog coupons for coupon manager. No need to use the method independently.
getCouponTypesReturns array of available coupon types.
getDataReturns array of coupon parameters or false when coupon was not found. No need to use the method independently.
getMapReturns list of fields for table with discount coupons.
getTableNameReturns name for table with discount coupons.
isExistChecks coupon existence. When coupon is available, returns array of its parameters, otherwise returns false.
onBeforeAddDefault handler for the event onBeforeAdd.
onBeforeUpdateDefault handler for the event onBeforeUpdate.
saveAppliedSaves applied coupons. No need to use the method independently.
validateCouponReturns validator for the field COUPON (код купона).
validateDiscountIdReturns 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
Up