$eventManager = Main\EventManager::getInstance();
$eventManager->addEventHandler(
"sale",
"Bitrix\Sale\Internals\DiscountTable::OnAfterUpdate",
"nameSomeFunction"
);
SELECT `ID`, `LEFT_MARGIN`, `RIGHT_MARGIN` FROM `b_iblock_section` WHERE `b_iblock_section`.`ID` = (SELECT `IBLOCK_SECTION_ID` FROM `b_iblock_section_element` where `b_iblock_section_element`.`IBLOCK_ELEMENT_ID`=149)
SELECT * FROM `b_iblock_section` WHERE `b_iblock_section`.`LEFT_MARGIN` <= 660 AND `b_iblock_section`.`RIGHT_MARGIN` >= 661 AND `b_iblock_section`.`DEPTH_LEVEL` = 1
SELECT `ID`, `LEFT_MARGIN`, `RIGHT_MARGIN` FROM `b_iblock_section` WHERE `b_iblock_section`.`ID` = (SELECT `IBLOCK_SECTION_ID` FROM `b_iblock_section_element` where `b_iblock_section_element`.`IBLOCK_ELEMENT_ID`=149)
SELECT * FROM `b_iblock_section` WHERE `b_iblock_section`.`LEFT_MARGIN` <= 660 AND `b_iblock_section`.`RIGHT_MARGIN` >= 661 AND `b_iblock_section`.`DEPTH_LEVEL` = 1
Array
(
[SECTIONS] => Array
(
[19] => Array
(
[ID] => 19
)
[20] => Array
(
[ID] => 20
)
[21] => Array
(
[ID] => 21
)
)
[ELEMENTS] => Array
(
[19] => Array
(
[ID] => 19
[NAME] => QWe
[VALUE] => FEf
[URL] => efwfw
....
)
[13] => Array
(
[ID] => 13
[NAME] => sdfsd
[VALUE] => FsdfggEf
[URL] => ee
....
)
[25] => Array
(
[ID] => 25
[NAME] => Treg
[VALUE] => Grge
[URL] => Effee
....
)
)
)
OnAfterAddDiscountTable - это функция, которая вызывается при срабатывании события, да?