...Человеческий поиск в разработке...
- Модуль: catalog
- Путь к файлу: ~/bitrix/modules/catalog/lib/controller/price.php
- Класс: BitrixCatalogControllerPrice
- Вызов: Price::modifySingleProductPrice
private function modifySingleProductPrice(array $fields): ?array { $resultGroupType = GroupTable::getRowById((int)$fields['CATALOG_GROUP_ID']); if (!$resultGroupType) { $this->addError(new Error('Validate price error. Catalog price group is wrong')); return null; } $entityTable = $this->getEntityTable(); $prices = $entityTable::getList( [ 'filter' => [ '=PRODUCT_ID' => $fields['PRODUCT_ID'], '=CATALOG_GROUP_ID' => $fields['CATALOG_GROUP_ID'], ] ] ) ->fetchAll() ; $prices = array_combine(array_column($prices, 'ID'), $prices); $prices[$fields['ID']] = $fields; $r = $this->modifyValidate($prices); if ($r->isSuccess()) { $r = $this->modify([ 'PRODUCT' => [ 'ID' => $fields['PRODUCT_ID'], 'PRICES' => [$fields] ] ]); } if (!$r->isSuccess()) { $this->addErrors($r->getErrors()); return null; } $ids = $r->getData()[0]; return [ 'PRICE'=>$this->get($ids[0]) ]; }