protected function prepareData() { if ($this->arParams['ID'] <= 0) { CIBlockFindTools::getElementID($this->arParams["ID"], $this->arParams["CODE"], false, false, array("IBLOCK_ID" => $this->arParams["IBLOCK_ID"], "IBLOCK_LID" => SITE_ID, "IBLOCK_ACTIVE" => "Y", "ACTIVE_DATE" => "Y", "ACTIVE" => "Y", "CHECK_PERMISSIONS" => "Y", "MIN_PERMISSION" => 'R')); } if ($this->arParams['ID'] <= 0) { throw new SystemException(Loc::getMessage("CATALOG_RECOMMENDED_PRODUCTS_COMPONENT_PRODUCT_ID_REQUIRED")); } parent::prepareData(); }
/** * @override * @throws Exception */ protected function checkModules() { parent::checkModules(); if (!$this->isSale) { throw new SystemException(Loc::getMessage("CVP_SALE_MODULE_NOT_INSTALLED")); } }
/** * @override */ protected function formatResult() { parent::formatResult(); if (empty($this->arResult['ITEMS'])) { $this->arResult = array(); } else { $this->arResult['ID'] = is_array($this->items) ? array_keys($this->items) : array(); } }