• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/v2/Sku/Sku.php
  • Класс: BitrixCatalogv2SkuSku
  • Вызов: Sku::saveInternalEntity
public function saveInternalEntity(): Result
{
	$isNeedCheckProductLinkAfterSaving = $this->isNew();
	$result = parent::saveInternalEntity();

	if ($isNeedCheckProductLinkAfterSaving && $result->isSuccess())
	{
		$product = $this->getParent();
		if ($product && $this->iblockInfo->getSkuPropertyId())
		{
			CIBlockElement::SetPropertyValuesEx(
				$this->getId(),
				$this->iblockInfo->getSkuIblockId(),
 					[$this->iblockInfo->getSkuPropertyId() => $product->getId()]
			);
		}

		$this->checkProductLink();
	}

	return $result;
}