Forked from bxtimur/gist:41192c59b91267e08bd2c4b2a12375ae
Created
July 24, 2018 21:29
-
-
Save ASDAFF/7d86a28e8dea1e62c1b54c65ea35c778 to your computer and use it in GitHub Desktop.
Отправка доп. полей в письме при новом заказе Битрикс
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| AddEventHandler("sale", "OnOrderNewSendEmail", "bxModifySaleMails"); | |
| function bxModifySaleMails($orderID, &$eventName, &$arFields) { | |
| $additional_information = ''; | |
| $arOrder = CSaleOrder::GetByID($orderID); | |
| $order_props = CSaleOrderPropsValue::GetOrderProps($orderID); | |
| while ($arProps = $order_props->Fetch()){ | |
| // телефон | |
| if ($arProps['ORDER_PROPS_ID'] == 14){ | |
| $additional_information.='Телефон: '.$arProps['VALUE'].'<br>'; | |
| } | |
| if ($arProps['ORDER_PROPS_ID'] == 13){ | |
| $additional_information.='<br />E-mail: '.$arProps['VALUE'].'<br>'; | |
| } | |
| } | |
| $arFields["ADDITIONAL_INFORMATION"] = $additional_information; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment