Your IP : 18.191.15.173


Current Path : /home/bitrix/ext_www/dev.easy-comfort.com.ua/bitrix/admin/
Upload File :
Current File : /home/bitrix/ext_www/dev.easy-comfort.com.ua/bitrix/admin/offersgroup_getReference.php

<? 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;