1
0
mirror of synced 2024-11-24 06:16:29 +03:00

Исправлена передача изменений по клиентам, отсутствующим в Bitrix (#360)

This commit is contained in:
Rinacoder 2024-09-06 15:10:19 +03:00 committed by GitHub
parent 1b64044013
commit 169509c263
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 36 additions and 3 deletions

View File

@ -1,3 +1,6 @@
## 2024-09-02 v.6.5.27
- Исправлена передача изменений по клиентам, отсутствующим в Bitrix
## 2024-08-26 v.6.5.26 ## 2024-08-26 v.6.5.26
- Исправлено удаление модуля - Исправлено удаление модуля

View File

@ -221,6 +221,36 @@ class CustomerBuilder extends AbstractBuilder implements RetailcrmBuilderInterfa
$this->customer->setSubscribe('N'); $this->customer->setSubscribe('N');
} }
} }
if (empty($this->dataCrm['externalId'])
&& (empty($this->dataCrm['firstName'])
|| empty($this->dataCrm['email']))
) {
$api = new RetailCrm\ApiClient(RetailcrmConfigProvider::getApiUrl(), RetailcrmConfigProvider::getApiKey());
$customerResponse = RCrmActions::apiMethod($api, 'customersGetById', __METHOD__, $this->dataCrm['id']);
if ($customerResponse instanceof RetailCrm\Response\ApiResponse
&& $customerResponse->isSuccessful()
&& !empty($customerResponse['customer'])
) {
$crmCustomer = $customerResponse['customer'];
if (empty($this->dataCrm['email'])
&& !empty($crmCustomer['email'])
) {
$email = $crmCustomer['email'];
$this->customer->setEmail($this->fromJSON($email));
$this->customer->setLogin($email);
}
if (empty($this->dataCrm['firstName'])
&& !empty($crmCustomer['firstName'])
) {
$this->customer->setName($this->fromJSON($crmCustomer['firstName']));
}
}
}
} }
public function buildPassword() public function buildPassword()

View File

@ -1 +1 @@
- Исправлено удаление модуля - Исправлена передача изменений по клиентам, отсутствующим в Bitrix

View File

@ -1,6 +1,6 @@
<?php <?php
$arModuleVersion = [ $arModuleVersion = [
'VERSION' => '6.5.26', 'VERSION' => '6.5.27',
'VERSION_DATE' => '2024-08-26 17:30:00' 'VERSION_DATE' => '2024-09-02 10:00:00'
]; ];