Answer the question
In order to leave comments, you need to log in
Why can't AddEventHandler work in bitrix?
Code in init.php
AddEventHandler("catalog", "OnDiscountAdd", Array("MyClass", "OnDiscountAddTest"));
class MyClass
{
function OnDiscountAddTest($arFields)
{
var_dump($arFields);
echo("test");
exit();
}
}
Answer the question
In order to leave comments, you need to log in
Try calling the CCatalogDiscount::Add method and see if your handler works.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question