Y
Y
Yuri Voronin2018-11-30 17:43:05
1C-Bitrix
Yuri Voronin, 2018-11-30 17:43:05

How to catch discount creation/editing event in admin. Bitrix panels?

Hello
Is it possible to track when someone in the admin panel creates or edits a discount (Marketing - Product Marketing - Product Discounts) ?
Maybe something like this can be done AddEventHandler("sale", "OnOrderSave", "saveOrderData"); ?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Gritsuk, 2018-11-30
@yuraSco


The Bitrix\Sale\Internals\DiscountTable ORM class describes the rules for working with a shopping cart (they are also discounts) . and creating events.

$eventManager = Main\EventManager::getInstance();
$eventManager->addEventHandler(
    "module_name",
    "\SomePartner\MyBooksCatalog\Book::OnBeforeUpdate",
    <ваш callback>
);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question