K
K
KASich2021-04-30 16:49:59
1C-Bitrix
KASich, 2021-04-30 16:49:59

How to view an array of product data transferred during import from 1C?

In order to undo changes to an element or redefine some fields, we can use the OnBeforeIBlockElementUpdate event.
Sometimes this is required to be done during the unloading of goods from 1C. To do this, we listen for an event in init.php.

AddEventHandler("iblock", "OnBeforeIBlockElementUpdate", "DoNotUpdate");
function DoNotUpdate(&$arFields)
{
    ...
}


But in order to redefine the fields, you need to know what they are called. Sitting and guessing is not a good option. It would be desirable to learn what data is transferred.
How to display and see this same $arFields array ?

Specifically, in my case, I want to change the quantity of goods in several warehouses.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene, 2021-04-30
@KASich

1. This is far from the first question, it's all about the wrong approach, here, for example, I already answered.
2. The OnBeforeIBlockElementUpdate event is not suitable for this; for stock balances, use the OnStoreProductUpdate and OnStoreProductAdd events. All events of changing/adding prices, main balance, stock balances, etc. are in the Trade catalog module, see the list here

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question