• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/helpers/admin/catalogedit.php
  • Класс: BitrixCatalogHelpersAdminCatalogEdit
  • Вызов: CatalogEdit::createSkuProperty
protected function createSkuProperty($parentiblockId, $offerIblockId)
{
	$parentiblockId = (int)$parentiblockId;
	$offerIblockId = (int)$offerIblockId;
	if ($parentiblockId <= 0 || $offerIblockId <= 0)
		return 0;

	$result = CIBlockPropertyTools::createProperty(
		$offerIblockId,
		CIBlockPropertyTools::CODE_SKU_LINK,
		array('LINK_IBLOCK_ID' => $parentiblockId)
	);
	if (!$result)
		$this->errors = array_merge($this->errors, CIBlockPropertyTools::getErrors());

	return $result;
}