/* для поменл значения свойств в товаре */
function copy_from_fields_to_propertys_values($IBLOCK_ID){
if ( CModule::IncludeModule ( "iblock" ) ){
$arOrder = array(
"sort" => "ASC",
);
$arFilter = array(
"IBLOCK_ID" => $IBLOCK_ID,
);
$arSelect = array(
"NAME",
"ID",
'SUBSCRIBE' );
$db_elemens = CIBlockElement::GetList ( $arOrder, $arFilter, false, false, $arSelect );
while ( $arElement = $db_elemens->GetNextElement() ) {
$el = new CIBlockElement;
$filds = $arElement->GetFields();
print_r($filds['ID']);
echo"</br>";
echo"</br>";
$arLoadProductArray = Array(
"SUBSCRIBE" => "Y"
);
$res = $el->Update($filds['ID'], $arLoadProductArray);
}
} else {
die( "Модуль iblock не установлен" );
}
}
copy_from_fields_to_propertys_values('33')
;\Bitrix\Catalog\Model\Product::update($id, ['SUBSCRIBE' => 'Y']);