• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/ebay/exportoffer.php
  • Класс: BitrixCatalogEbayExportOffer
  • Вызов: ExportOffer::getCategories
protected function getCategories($productId)
{
	$boolCurrentSections = false;
	$result = array();

	$dbElementGroups = CIBlockElement::GetElementGroups($productId, false, array('ID', 'ADDITIONAL_PROPERTY_ID'));

	while ($arElementGroup = $dbElementGroups->Fetch())
	{
		if (0 < (int)$arElementGroup['ADDITIONAL_PROPERTY_ID'])
			continue;

		$boolCurrentSections = true;

		if (in_array((int)$arElementGroup["ID"], $this->arSectionIDs))
			$result[] = $arElementGroup["ID"];
	}

	if (!$boolCurrentSections)
		$result[] = $this->intMaxSectionID;

	return $result;
}