15 $productId = (int)$productId;
18 $agentProduct = Catalog\AgentProductTable::getRow([
23 '=PRODUCT_ID' => $productId,
28 Main\Loader::includeModule(
'iblock');
30 $element = Iblock\ElementTable::getList([
31 'select' => [
'ID',
'NAME'],
32 'filter' => [
'=ID' => $productId],
35 $error = Main\Localization\Loc::getMessage(
36 'CATALOG_AGENT_CONTRACT_ERROR_ELEMENT_IN_DOCUMENT_EXISTS',
38 '#ID#' => $element[
'ID'],
39 '#NAME#' => $element[
'NAME'],
42 $APPLICATION->ThrowException($error);