customersUpload: finding uniq clients by externalId
This commit is contained in:
parent
fb09bf3dbb
commit
c40c83aad0
@ -6,7 +6,7 @@
|
||||
Bitrix module
|
||||
=============
|
||||
|
||||
Bitrix module for interaction with [RetailCRM](http://www.retailcrm.ru)
|
||||
Bitrix module for interaction with [RetailCRM](https://www.retailcrm.ru)
|
||||
|
||||
Module allows:
|
||||
|
||||
@ -19,4 +19,4 @@ Installation
|
||||
|
||||
You should install module through [Bitrix.Marketplace](http://marketplace.1c-bitrix.ru/solutions/intaro.retailcrm/).
|
||||
|
||||
[Setup guide](https://docs.retailcrm.ru/ru/Users/Integration/SiteModules/1CBitrix)
|
||||
[Setup guide](https://docs.retailcrm.ru/Users/Integration/SiteModules/1CBitrix)
|
||||
|
@ -458,14 +458,14 @@ class RetailCrmOrder
|
||||
$resCustomersCorporate[$arCustomerCorporate['nickName']] = $arCustomerCorporate;
|
||||
}
|
||||
|
||||
$email = $arCustomer['email'] ?? '';
|
||||
|
||||
if (!in_array($email, $resCustomersAdded)) {
|
||||
$resCustomersAdded[] = $email;
|
||||
if (
|
||||
array_key_exists('externalId', $arCustomer)
|
||||
&& !in_array($arCustomer['externalId'], $resCustomersAdded, true)
|
||||
) {
|
||||
$resCustomersAdded[] = $arCustomer['externalId'];
|
||||
$resCustomers[$order['LID']][] = $arCustomer;
|
||||
}
|
||||
|
||||
$resCustomers[$order['LID']][] = $arCustomer;
|
||||
$ordersPack[$order['LID']][] = $arOrders;
|
||||
$recOrders[] = $orderId;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user