- Модуль: crm
- Путь к файлу: ~/bitrix/modules/crm/classes/mysql/crm_product_row.php
- Класс: \CCrmProductRow
- Вызов: CCrmProductRow::SaveSettings
static function SaveSettings($ownerType, $ownerID, $settings)
{
$ownerType = $ownerType;
$ownerID = intval($ownerID);
$connection = \Bitrix\Main\Application::getConnection();
$helper = $connection->getSqlHelper();
$insert = [
'OWNER_ID' => $ownerID,
'OWNER_TYPE' => $ownerType,
'SETTINGS' => serialize($settings),
];
$update = [
'SETTINGS' => $insert['SETTINGS'],
];
$merge = $helper->prepareMerge(self::CONFIG_TABLE_NAME, ['OWNER_ID', 'OWNER_TYPE'], $insert, $update);
$connection->query($merge[0]);
}