SubscribeTable class for handling table with subscriptions to unavailable products.

Class methods

MethodDescription Available from version
checkPermissionSubscribeChecks permission for subscription to product.
getContactTypesReturns all available user contacts types used for subscription.
getMapReturns list of fields for table with subscriptions to unavailable products.
getTableNameReturns name for table with subscriptions to unavailable products.
onAddContactTypeHandler to the event onAddContactType. Adds new user contact type.
onIblockElementDeleteHandler to the event onIblockElementDelete. Deletes subscription data when deleting a product.
onProductSetAvailableUpdateHandler to the event onProductSetAvailableUpdate. Sends notification about product availability (event for bundles).
onProductUpdateHandler for the event onProductUpdate. Sends notification to subscribers about product availability (event for standard products).
onSaleOrderSaved Handler for the event OnSaleOrderSaved. Deletes user's product subscription when placing an order.
onUserDelete Handler for the event onUserDelete. Updates subscription data when deleting a user.
runAgentToSendNoticeLaunches agent for subscriber notifications delivery.
runAgentToSendRepeatedNoticeLaunches agent for recurring subscriber notifications.
sendNoticeAgent. Receives necessary data and sends notifications to users.
sendRepeatedNoticeAgent. Receives necessary data and sends recurring user notifications.
setOldProductAvailableSaves old product availability value into a static variable for later check, how this availability was updated.
validateNeedSendingReturns validator for the field NEED_SENDING.
validateSiteId Returns validator for the field SITE_ID.

Fields of subscriptions to unavailable products

Field Description Type Required
ID Subscription ID. Int Yes
DATE_FROM Product subscription start date. DatetimeYes
DATE_TO Product subscription end date.DatetimeNo
USER_CONTACTUser contact.Varchar(255) Yes
CONTACT_TYPEContact type.Smallint Yes
USER_IDuser ID.Int No
ITEM_IDProduct ID.Int Yes
NEED_SENDING Subscription activity.Char(1) Yes
SITE_IDSite ID.Char(2) Yes

© «Bitrix24», 2001-2024