L
L
linc5552021-06-30 00:18:32
1C-Bitrix
linc555, 2021-06-30 00:18:32

How to track the subscription event for an out-of-stock item in 1C-Bitrix?

At this stage, on the detailed product page there is a subscription component "bitrix:catalog.product.subscribe" , the task is to send a promotional code to the mail when subscribing to the missing one. How it is better to implement it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
PetrPo, 2021-06-30
@linc555

$eventManager = \Bitrix\Main\EventManager::getInstance();
$eventManager->addEventHandler('catalog', '\Bitrix\Catalog\Subscribe::onAfterAdd', ['СatalogEvents', 'onAfterAddSubscribe']);

Create a letter template, send it in an event

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question