add PERSONAL_GENDER
This commit is contained in:
parent
1f1fec4864
commit
00269a98d9
1 changed files with 16 additions and 0 deletions
|
@ -225,6 +225,10 @@ class RetailCrmHistory
|
|||
$arUser["EMAIL"] = $customer['email'] ? RCrmActions::fromJSON($customer['email']) : '';
|
||||
}
|
||||
|
||||
if (array_key_exists('sex', $customer)) {
|
||||
$arUser["PERSONAL_GENDER"] = $customer['sex'] ? RCrmActions::fromJSON($customer['sex']) : '';
|
||||
}
|
||||
|
||||
$u = $newUser->Update($customer['externalId'], $arUser);
|
||||
if (!$u) {
|
||||
RCrmActions::eventLog(
|
||||
|
@ -1219,6 +1223,18 @@ class RetailCrmHistory
|
|||
unset($change['customer']['contragent']);
|
||||
}
|
||||
|
||||
if ($change['field'] == 'segments') {
|
||||
if ($change['newValue']['code'] == "genshchini") {
|
||||
$customers[$change['customer']['id']]["sex"] = "F";
|
||||
}
|
||||
}
|
||||
|
||||
if ($change['field'] == 'segments') {
|
||||
if ($change['newValue']['code'] == "mugchini") {
|
||||
$customers[$change['customer']['id']]["sex"] = "M";
|
||||
}
|
||||
}
|
||||
|
||||
if ($fields['customer'][$change['field']] == 'phones') {
|
||||
$key = count($customers[$change['customer']['id']]['phones']);
|
||||
if (isset($change['oldValue'])) {
|
||||
|
|
Loading…
Add table
Reference in a new issue