Answer the question
In order to leave comments, you need to log in
How to solve the problem with unloading from 1s if the group structure changes?
The problem is this. If managers move groups in 1s, unloading from 1s does not work. What to do?
Answer the question
In order to leave comments, you need to log in
Catch the moment of unloading from 1C on the Bitrix side, in init.php, and replace the sections of the goods with the ones you need.
<?
AddEventHandler("iblock", "OnBeforeIBlockElementUpdate","changeElementFieldsOnUpdateImport1C");
function changeIblockSectionsOnImportUpdate(&$arFields)
{
if ($_REQUEST['mode']=='import')
{
// тут смотрите $arFields товара и заменяете нужные значения
}
}
AddEventHandler("iblock", "OnBeforeIBlockElementAdd","changeElementFieldsOnAddImport1C");
function changeElementFieldsOnAddImport1C(&$arFields)
{
if ($_REQUEST['mode']=='import')
{
// тут смотрите $arFields товара и заменяете нужные значения
}
}
?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question