Answer the question
In order to leave comments, you need to log in
How to write a phone number in a profile during auto-registration (BITRIX)?
Good afternoon
The site has a minimally customized ordering component, the user fills in 5 fields, one of them is a phone number, but this number is not saved in the user profile.
I tried to write a handler, but it didn’t work for me, I almost didn’t encounter them, and with php I’m so-so
Here’s what I tried to use:
AddEventHandler("sale", "OnBeforeOrderAdd", "OnBeforeOrderAdd");
function OnBeforeOrderAdd(&$arProps)
{
// echo "<pre>";
// print_r($arProps);
// echo "</pre>";
// die();
global $USER;
$userID = $USER->GetID();
$user = new CUser;
$fields = Array(
"PERSONAL_PHONE" => $arProps['ORDER_PROP']['3'],
);
$user->Update($userID, $fields);
}
$arProps['ORDER_PROP']['3']
phone number entered into the form by the user is stored in
Answer the question
In order to leave comments, you need to log in
Look here https://dev.1c-bitrix.ru/community/webdev/user/168...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question