Код |
---|
<? AddEventHandler("main", "OnAfterUserRegister", "OnBeforeUserRegisterHandler"); function OnBeforeUserRegisterHandler(&$arFields) { $arProfileFields = array( "NAME" => "Профиль покупателя (".$arFields['LOGIN'].')', "USER_ID" => $arFields['USER_ID'], "PERSON_TYPE_ID" => 1 ); $PROFILE_ID = CSaleOrderUserProps::Add($arProfileFields); if ($PROFILE_ID) { $PROPS=Array( array( "USER_PROPS_ID" => $PROFILE_ID, "ORDER_PROPS_ID" => 22, "NAME" => "Фамилия", "VALUE" => $arFields['LAST_NAME'] ), array( "USER_PROPS_ID" => $PROFILE_ID, "ORDER_PROPS_ID" => 23, "NAME" => "Имя", "VALUE" => $arFields['LAST_NAME'] ) ); foreach ($PROPS as $prop) CSaleOrderUserPropsValue::Add($prop); } } ?> |
Код |
---|
$(document).ready(function(){ $('table.sale_order_full_table_no_border tbody tr:eq(1)').css('display', 'none'); $("table").everyTime(10, function(){ $('table.sale_order_full_table_no_border tbody tr:eq(1)').css('display', 'none'); var ima; var otch; var fam; fam = $('#ORDER_PROP_22').attr('value'); ima = $('#ORDER_PROP_23').attr('value'); otch = $('#ORDER_PROP_24').attr('value'); $('#ORDER_PROP_21').attr('value', fam + ' ' + ima + ' ' + otch); },0); }); |
Код |
---|
global $USER; if ($USER->IsAuthorized()) { $db_user = CUser::GetByID($USER->GetID()); if ($ar_user = $db_user->Fetch()) { while (list($key, $val) = each($ar_user)) ${"str_".$key} = htmlspecialchars($val); } $s = $USER->GetLastName()." ".$USER->GetFirstName()." ".$str_SECOND_NAME; $arResult['ORDER_PROP']['USER_PROPS_Y']['1']['VALUE'] = $s; $arResult['ORDER_PROP']['USER_PROPS_Y']['1']['VALUE_FORMATED'] = $s; } |
Код |
---|
<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true)die(); ShowMessage($arParams["~AUTH_RESULT"]); $APPLICATION->IncludeComponent( "bitrix:main.register", "", Array( "USER_PROPERTY_NAME" => "", "SEF_MODE" => "N", "SHOW_FIELDS" => Array("NAME", "SECOND_NAME", "LAST_NAME", "PERSONAL_MOBILE", "PERSONAL_NOTES"), "REQUIRED_FIELDS" => Array("PERSONAL_MOBILE", "PERSONAL_NOTES"), "AUTH" => "Y", "USE_BACKURL" => "Y", "SUCCESS_PAGE" => $APPLICATION->GetCurPageParam('',array('backurl')), "SET_TITLE" => "N", "USER_PROPERTY" => Array() ) ); ?><p><a href="<?=$arResult["AUTH_AUTH_URL"]?>"><b><?=GetMessage("AUTH_AUTH")?></b></a></p><? ?> |