(☞ຈل͜ຈ)☞ Главная  Статьи  Загрузчик Домой

Ok!
Ok!
76
<?if(!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die();

use BitrixIblock;

$sectionsID = array();
foreach ($arResult["ITEMS"] as $arItem) {
    if ($arItem["IBLOCK_SECTION_ID"]) {
        $sectionsID[] = $arItem["IBLOCK_SECTION_ID"];
    }
}
$sectionsID = array_unique($sectionsID);

$result = IblockSectionTable::getList(array(
    "select" => array(
        "ID",
        "NAME",
    ),
    "filter" => array(
        "ID" => $sectionsID,
        "IBLOCK_ID" => $arResult["IBLOCK_ID"],
    ),
));

$arResult["SECTIONS"] = array();
while ($row = $result->fetch()) {
    $arResult["SECTIONS"][$row["ID"]] = $row;
}

sections, bitrix, sections by id120Выбор секций каталога Битрикс по ID элемента
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21