Answer the question
In order to leave comments, you need to log in
How to resume sending email?
Good afternoon. When buying a product in one click, a letter about such an order and a letter with information about this order are sent to the site's mail (this letter is also sent to the buyer). There are two different events for these two letters, and the second one is called by the CSaleOrder::DoSaveOrder method. Since this event also fires when ordering through the cart, in this case it is necessary that an order letter be sent to both the admin and the client (as it is now done). The question is how to cancel sending the second letter to the admin mail when buying in one click? Thought to do it
\Bitrix\Sale\Notify::setNotifyDisable(true);
$ORDER_ID = (int)CSaleOrder::DoSaveOrder($arOrderDat, $arOrderFields, 0, $arResult["ERROR"]);
Bitrix\Sale\Notify::setNotifyDisable(false);
CEvent::Send("SALE_NEW_ORDER_FAST", htmlspecialcharsbx($_GET["SITE_ID"]), "", "N", 222);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question