use \Bitrix\Main\Entity;
use \Bitrix\Main\EventManager;
use \Bitrix\Main\Diag\Debug;
$eventManager = EventManager::getInstance();
$eventManager->addEventHandler(
"catalog",
"\Bitrix\Catalog\Subscribe::onAdd",
['CustomSubscribeProduct', 'OnSubscribeSubmit']
);
class CustomSubscribeProduct{
public static function OnSubscribeSubmit(Entity\Event $event)
{
$result = new Entity\EventResult;
$data = $event->getParameter("fields");
Debug::writeToFile($data, '$data', 'OnSubscribeSubmit.txt');
}
}
результат в OnSubscribeSubmit.txt