$arFields = array(
"CONDITIONS" => array (
'CLASS_ID' => 'CondGroup',
'DATA' =>
array (
'All' => 'AND',
'True' => 'True',
),
'CHILDREN' =>
array (
0 =>
array (
'CLASS_ID' => 'CondIBElement',
'DATA' =>
array (
'logic' => 'Equal',
'value' => 213563, 213564, 213574 //товар с ID=2975
),
),
),
)
);
$update = CCatalogDiscount::Update(1785, $arFields);
$arFields = array(
"PRODUCT_IDS" => 213563, 213564, 213574
);
$update = CCatalogDiscount::Update(1785, $arFields);
$dbProductDiscounts = CCatalogDiscount::GetList(
array("SORT" => "ASC"),
array("ID" => 1785),
false,
false,
array("ID", "PRODUCT_ID")
);