A
A
Alexander2021-01-27 15:58:23
1C-Bitrix
Alexander, 2021-01-27 15:58:23

How, before loading or updating goods from 1s to Bitrix, to prohibit unloading goods with a price of 0, or replace zero with empty?

It is necessary not to upload prices equal to zero, or change them to empty
How to do this when exchanging with 1C?
I don't know where to start dripping.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Emelyanov, 2021-01-27
@kikher

Add an event check OnBeforeIBlockElementUpdateor OnBeforeProductAdd. In the handler, to determine that the event was called during the exchange with 1C, you can use the following crutch condition:

if (isset($_GET['type'], $_GET['mode']) && $_GET['type'] === 'catalog' && $_GET['mode'] === 'import') {
    // ...
}

Here is more details.

K
Konstantin, 2021-01-27
@fosihas

In the code)
look for a request that generates data for unloading. Correct it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question