Good day
It is necessary when importing goods from 1C to 1C-Bitrix rewrite the price $arFields['PRICE']=$arFields['PRICE']/100*110; , in init.php threw an event (I found something similar on the forum), but the price does not change

 <? AddEventHandler("iblock", "OnBeforeIBlockElementUpdate", Array("MyClass", "OnBeforeIBlockElementUpdateHandler")); class MyClass { function OnBeforePriceUpdateHandler($PRICE_ID, $arFields) { $db_price = CPrice::GetList( array(), array( "ID" => $PRICE_ID ) ); if($ar_price = $db_price->Fetch()) { if($ar_price['PRICE'] != $arFields['PRICE']) { $arFields['PRICE']=$arFields['PRICE']/100*110; } } } } 

    1 answer 1

    Unfortunately, when importing, an item change event does not occur. There is an OnSuccessCatalogImport1C event that occurs when one import step is completed - and you can hang up on it to search for updated products and call your function for them.

     AddEventHandler('catalog', 'OnSuccessCatalogImport1C', 'OnBeforeAllPriceUpdateHandler');