1
0
mirror of synced 2025-01-18 08:51:40 +03:00

Исправлена ошибка при передаче подписки на рекламно-информационные рассылки (#324)

This commit is contained in:
Uryvskiy Dima 2023-12-08 12:27:10 +03:00 committed by GitHub
parent 748ebdf4a3
commit 18a10bf916
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 8 deletions

View File

@ -1,3 +1,6 @@
## 2023-10-25 v.6.4.11
- Исправлена ошибка при передаче подписки на рекламно-информационные рассылки
## 2023-10-25 v.6.4.10 ## 2023-10-25 v.6.4.10
- Добавлена передача трек-номера в заказе из CRM в Bitrix - Добавлена передача трек-номера в заказе из CRM в Bitrix

View File

@ -1,7 +1,7 @@
[![Build Status](https://github.com/retailcrm/bitrix-module/workflows/ci/badge.svg)](https://github.com/retailcrm/bitrix-module/actions) [![Build Status](https://github.com/retailcrm/bitrix-module/workflows/ci/badge.svg)](https://github.com/retailcrm/bitrix-module/actions)
[![GitHub release](https://img.shields.io/github/release/retailcrm/bitrix-module.svg?logo=github)](https://github.com/retailcrm/bitrix-module/releases) [![GitHub release](https://img.shields.io/github/release/retailcrm/bitrix-module.svg?logo=github)](https://github.com/retailcrm/bitrix-module/releases)
[![Coverage](https://img.shields.io/codecov/c/gh/retailcrm/bitrix-module/master.svg?logo=codecov)](https://codecov.io/gh/retailcrm/bitrix-module) [![Coverage](https://img.shields.io/codecov/c/gh/retailcrm/bitrix-module/master.svg?logo=codecov)](https://codecov.io/gh/retailcrm/bitrix-module)
[![PHP version](https://img.shields.io/badge/PHP->=7.4-blue.svg?logo=php)](https://php.net/) [![PHP version](https://img.shields.io/badge/PHP->=8.0-blue.svg?logo=php)](https://php.net/)
Bitrix module Bitrix module
============= =============

View File

@ -287,7 +287,7 @@ class RetailCrmEvent
$userCrm = RCrmActions::apiMethod($api, 'customersGet', __METHOD__, $arOrder['USER_ID'], $site); $userCrm = RCrmActions::apiMethod($api, 'customersGet', __METHOD__, $arOrder['USER_ID'], $site);
if (!isset($userCrm['customer'])) { if (!isset($userCrm['customer'])) {
$arUser = UserTable::getById($arOrder['USER_ID'])->fetch(); $arUser = CUser::GetByID($arOrder['USER_ID'])->Fetch();
if (!empty($address)) { if (!empty($address)) {
$arUser['PERSONAL_STREET'] = $address; $arUser['PERSONAL_STREET'] = $address;
@ -412,7 +412,8 @@ class RetailCrmEvent
$userCrm = RCrmActions::apiMethod($api, 'customersGet', __METHOD__, $arOrder['USER_ID'], $site); $userCrm = RCrmActions::apiMethod($api, 'customersGet', __METHOD__, $arOrder['USER_ID'], $site);
if (!isset($userCrm['customer'])) { if (!isset($userCrm['customer'])) {
$arUser = Bitrix\Main\UserTable::getById($arOrder['USER_ID'])->fetch(); $arUser = CUser::GetByID($arOrder['USER_ID'])->Fetch();
$resultUser = RetailCrmUser::customerSend( $resultUser = RetailCrmUser::customerSend(
$arUser, $arUser,
$api, $api,
@ -429,7 +430,7 @@ class RetailCrmEvent
); );
return null; return null;
}http://localhost/personal/cart/ }
} }
} }

View File

@ -48,8 +48,9 @@ class RetailCrmUser
$normalizer = new RestNormalizer(); $normalizer = new RestNormalizer();
$customer = $normalizer->normalize($customer, 'customers'); $customer = $normalizer->normalize($customer, 'customers');
if (empty($arFields['UF_SUBSCRIBE_USER_EMAIL'])) { if (array_key_exists('UF_SUBSCRIBE_USER_EMAIL', $arFields)) {
$customer['subscribed'] = false; // UF_SUBSCRIBE_USER_EMAIL = '1' or '0'
$customer['subscribed'] = (bool) $arFields['UF_SUBSCRIBE_USER_EMAIL'];
} }
Logger::getInstance()->write($customer, 'customerSend'); Logger::getInstance()->write($customer, 'customerSend');

View File

@ -1,6 +1,6 @@
<?php <?php
$arModuleVersion = [ $arModuleVersion = [
'VERSION' => '6.4.10', 'VERSION' => '6.4.11',
'VERSION_DATE' => '2023-10-25 15:00:00' 'VERSION_DATE' => '2023-12-08 13:00:00'
]; ];