Documentation

DiscountTable

DiscountTable class for handling table with shopping cart discounts.

Class methods

MethodDescription Available from version
getMapReturns list of fields for tale with shopping cart discounts.
getTableNameReturns name for table with shopping cart discounts in database.
onAfterAddDefault handler for the event onAfterAdd.
onAfterDelete Default handler for the event onAfterDelete.
onAfterUpdate Default handler for the event onAfterUpdate.
onBeforeAdd Default handler for the event onBeforeAdd.
onBeforeUpdate Default handler for the event onBeforeUpdate.
onDelete Default handler for the event onDelete.
setAllUseCouponsSets flag for available coupons for all shopping cart discounts.
setUseCouponsSets flag for available coupons for listed shopping cart discounts.
validateCurrencyReturns validator for the field CURRENCY.
validateDiscountTypeReturns validator for the field DISCOUNT_TYPE.
validateExecuteModule Returns validator for the field EXECUTE_MODULE.
validateLid Returns validator for the field LID.
validateName Returns validator for the field NAME.
validatePresetId Returns validator for the field PRESET_ID.
validateXmlId Returns validator for the field XML_ID.

Fields for shopping cart discounts

Field Description Type Required
IDDiscount ID.Int Yes
XML_ID External code.Varchar(255) No
LIDSite ID.Char(2) Yes
NAME Discount name. Varchar(255) No
CURRENCY Currency. Char(3) No
ACTIVE Active status flag (Y/N). Char(1) Yes
SORT Sorting order. Int Yes
ACTIVE_FROM Date discount active from. Datetime No
ACTIVE_TO Date discount active to. Datetime No
TIMESTAMP_X Date and time discount updated. Datetime No
MODIFIED_BY User ID who was the last to update the discount. Int No
DATE_CREATE Date and tie discount was created. Datetime No
CREATED_BY User ID who created the discount. Int No
PRIORITY Priority for applicability. Int Yes
LAST_DISCOUNT Flag "Stop application of further rules" (Y/N). Char(1) Yes
VERSION Generated discounts version. Read only field. Int Yes
CONDITIONS Additional conditions for discount application. Mediumtext No
UNPACK PHP code for condition to apply the discount. Read only field. Mediumtext No
ACTIONS PHP code for executed discount actions. Read only field. Mediumtext No
APPLICATION Description for shopping cart discount actions as serialized array. Mediumtext No
USE_COUPONS Flag for available discount coupons(Y/N). Char(1) Yes
EXECUTE_MODULE Module code, where discount can be executed ("sale" - result is visible only in shopping cart/order, "catalog" or "all" - including on the catalog pages). Varchar(50) Yes


© «Bitrix24», 2001-2024
Up