Answer the question
In order to leave comments, you need to log in
How to pass additional parameters to an email when changing an order?
this event does not work AddEventHandler("sale", "OnSaleStatusOrderChange", "bxModifySaleMails");
AddEventHandler("sale", "OnOrderNewSendEmail", "bxModifySaleMails");
/*AddEventHandler("sale", "OnSaleStatusOrderChange", "bxModifySaleMails");*/
function bxModifySaleMails($orderID, &$eventName, &$arFields)
{
$order_props = CSaleOrderPropsValue::GetOrderProps($orderID)->Fetch();
$arFields["DELIVERY_TIME"] = $order_props["DELIVERY_TIME"];
}
Answer the question
In order to leave comments, you need to log in
You need the OnBeforeEventAdd
event
In the handler, check the passed mail event type for the one you use to notify about order changes, and add the required fields
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question