Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question