N
N
nikegk2017-10-13 16:04:59
1C-Bitrix
nikegk, 2017-10-13 16:04:59

How to catch the completion of unloading the directory from 1s to the site?

I unload a user directory from 1s and want to track the completion of this event.
Previously, to track the unloading of goods, I used the OnSuccessCatalogImport1C event in the following way:

AddEventHandler("catalog", "OnSuccessCatalogImport1C", "DSOnSuccessCatalogImport1C");
function DSOnSuccessCatalogImport1C(){
        AddMessage2Log("WORK!");
}

But when exchanging a directory (it is written in highloadblock), this construction does not work. I've tried changing the id of the module that will fire the event from catalog to highloadblock , but it still doesn't work. I understand this event only works with the catalog and products.
Can you please tell me how to track the end of the exchange in highloadblock?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
N
nikegk, 2017-10-13
@nikegk

Understood. Source .

use Bitrix\Main;
use Bitrix\Main\Entity;
 
$eventManager = Main\EventManager::getInstance();
$eventManager->addEventHandler("", "TransactionOnBeforeUpdate", "TransactionBeforeUpdate");
 
function TransactionBeforeUpdate(Entity\Event $event)
{ 
    echo "<pre>";
    $arParameters = $event->getParameters();
    var_dump($arParameters);
    return 1;
}

Where Transaction is the name of the IB

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question