/** * Return discount list description. * * @param bool $extMode Extended mode. * @return array */ public function getApplyResult($extMode = false) { if (Compatible\DiscountCompatibility::isUsed()) { return Compatible\DiscountCompatibility::getApplyResult($extMode); } $extMode = $extMode === true; if (!$this->newOrder && empty($this->orderData)) { $this->loadOrderData(); } $this->getApplyDiscounts(); $this->getApplyPrices(); $this->getApplyDeliveryList(); if ($extMode) { $this->remakingDiscountResult(); } $result = $this->discountResult; $result['CONVERTED_ORDER'] = $this->convertedOrder ? 'Y' : 'N'; if ($extMode) { unset($result['BASKET'], $result['ORDER']); } return $result; }