Your IP : 18.191.15.173
<? require_once($_SERVER["DOCUMENT_ROOT"] . "/bitrix/modules/main/include/prolog_admin_before.php");
use Webprofy\Offersgroup\RelationMain;
Bitrix\Main\Loader::includeModule('webprofy.offersgroup');
$arReference = \Webprofy\Offersgroup\RelationMain::getAllReference();
$arResult = [];
if(!empty($arReference)){
foreach ($arReference as $key => $item) {
$data = RelationMain::getReferenceDataName($item['RELATION_BITRIX_ID']);
if($item['RELATION_CODE'] == 'SIZE'){
$arResult['SIZE-min'] = $data;
$arResult['SIZE-max'] = $data;
}
else{
$arResult[$item['RELATION_CODE']] = $data;
}
}
}
echo json_encode($arResult); return;