Documentation

initUseMode

void public static
\Bitrix\Sale\DiscountCouponsManager::initUseMode(
 integer $mode = self::MODE_CLIENT,
 array $params = array()
);

Method sets coupon handling mode and user ID. Static method.

Parameters

ParameterDescriptionVersion
$modeCoupon mode.
$paramsArray with original parameters. Keys are case-sensistive:
  • userId - owner order ID (only for modes MODE_MANAGER or MODE_ORDER);
  • orderId - order ID, required for coupon mode with order existing coupons (only for the mode MODE_ORDER);
  • oldUserId - old order owner, if customer was updated in the edit form (only for modes MODE_MANAGER or MODE_ORDER).

Example



© «Bitrix24», 2001-2024
Up