Current Path : /home/bitrix/ext_www/dev.klimatlend.ua/ajax/json/ |
Current File : /home/bitrix/ext_www/dev.klimatlend.ua/ajax/json/getCategoryById.php |
<? header('Access-Control-Allow-Origin: *'); header('Content-type: application/json'); require($_SERVER["DOCUMENT_ROOT"]."/bitrix/modules/main/include/prolog_before.php"); Bitrix\Main\Loader::includeModule('sale'); Bitrix\Main\Loader::includeModule('catalog'); CModule::IncludeModule("iblock"); $category = $_GET["id"]; $res = CIBlockSection::GetByID($category); $ar_res = $res->GetNext(); //pre1($ar_res); echo json_encode($ar_res, JSON_UNESCAPED_UNICODE); ?>