• Модуль: sale
  • Путь к файлу: ~/bitrix/modules/sale/lib/discount.php
  • Класс: BitrixSaleDiscount
  • Вызов: Discount::saveExternalLastApplyblock
public function saveExternalLastApplyblock(BasketItem $basketItem, $orderDiscountId)
{
	/** @var Basket $basket */
	$basket = $basketItem->getCollection();
	$this->order = $basket->getOrder();

	$this->loadOrderData();

	$listItems[$basketItem->getBasketCode()] = array('APPLY'=>'Y', 'ACTION_BLOCK_LIST'=>array(), 'DESCR_DATA'=>array(), 'DESCR'=>array());

	$this->discountsCache[$orderDiscountId]['MODULE_ID'] = 'sale';
	$applyBlock = &$this->discountResult['APPLY_BLOCKS'][$this->discountResultCounter];
	$applyBlock['ORDER'][] = array(
		'DISCOUNT_ID' => $orderDiscountId,
		'COUPON_ID' => 0,
		'RESULT' => array('BASKET' => $listItems)
	);

	$this->saveLastApplyBlock();
}