use Bitrix\Main\Loader;
$sectionId = $item['~IBLOCK_SECTION_ID'] ?: $item['IBLOCK_SECTION_ID'] ?: 0;
$sectionName = '';
if (Loader::includeModule('iblock') && $item['~IBLOCK_SECTION_ID'] > 0) {
$section = CIBlockSection::GetByID($item['~IBLOCK_SECTION_ID'])->Fetch();
if ($section) {
$sectionName = $section['NAME'];
} else {
$sectionName = 'Раздел не найден';
}
} else {
$sectionName = 'Раздел не указан';
}
<span class="product-card__category">
<?php echo $sectionId; ?>
<?php echo $sectionName; ?>
</span>
$ git status
On branch development
Your branch is up to date with 'origin/development'.
nothing to commit, working tree clean
$ git commit -a
On branch development
Your branch is up to date with 'origin/development'.
nothing to commit, working tree clean