• Модуль: catalog
  • Путь к файлу: ~/bitrix/modules/catalog/lib/v2/Price/PriceRepository.php
  • Класс: BitrixCatalogv2PricePriceRepository
  • Вызов: PriceRepository::updateInternal
protected function updateInternal(int $id, array $fields): Result
{
	$result = new Result();

	// ToDo external_fields and actions?
	$res = Price::update($id, [
		'fields' => $fields,
		// 'external_fields' => [
		// 	'IBLOCK_ID' => $destinationPrice['ELEMENT_IBLOCK_ID']
		// ],
		// 'actions' => [
		// 	'RECOUNT_PRICES' => true
		// ],
	]);

	if (!$res->isSuccess())
	{
		$result->addErrors($res->getErrors());
	}

	return $result;
}