• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/product/systemfield/markingcodegroup.php
  • Класс: BitrixCatalogProductSystemFieldMarkingCodeGroup
  • Вызов: MarkingCodeGroup::prepareValueForProvider
static function prepareValueForProvider(array $field, array $productRow): array
{
	$value = $productRow[$field['XML_ID']];
	if ($value !== null)
	{
		$value = (int)$value;
	}
	if (self::isNeedParent($productRow))
	{
		if (
			!self::isUsedMarkingOffer()
			|| $value === self::USE_PARENT_PRODUCT_VALUE
		)
		{
			$productValue = self::getParentProductValue($productRow['ID'], $field);
			if ($value === self::USE_PARENT_PRODUCT_VALUE)
			{
				$value = $productValue;
			}
			else
			{
				$value = $productValue ?? $value;
			}
		}
	}

	$productRow[$field['XML_ID']] = ($value !== null
		? self::getXmlIdById($field['SETTINGS']['HLBLOCK_ID'], (int)$value)
		: null
	);

	return $productRow;
}