diff --git a/intaro.intarocrm/classes/general/ICrmOrderActions.php b/intaro.intarocrm/classes/general/ICrmOrderActions.php index 8afcb964..132b078e 100755 --- a/intaro.intarocrm/classes/general/ICrmOrderActions.php +++ b/intaro.intarocrm/classes/general/ICrmOrderActions.php @@ -327,11 +327,22 @@ class ICrmOrderActions 'createdAt' => $createdAt, 'deliveryAddress' => $resOrderDeliveryAddress, 'items' => $items - )); + ); + + // parse fio + if(count($contactNameArr) == 1) { + $resOrder['firstName'] = $contactNameArr[0]; + } else { + $resOrder['lastName'] = $contactNameArr['contactName'][0]; + $resOrder['firstName'] = $contactNameArr['contactName'][1]; + $resOrder['patronymic'] = $contactNameArr['contactName'][2]; + } if(isset($arParams['optionsSites']) && is_array($arParams['optionsSites']) && in_array($arFields['LID'], $arParams['optionsSites'])) $resOrder['site'] = $arFields['LID']; + + $resOrder = self::clearArr($resOrder); // parse fio if(count($contactNameArr) == 1) { @@ -404,6 +415,7 @@ class ICrmOrderActions return array(); $array = explode(" ", self::toJSON($str), 3); + $newArray = array(); foreach($array as $ar) { diff --git a/intaro.intarocrm/install/index.php b/intaro.intarocrm/install/index.php index f1da9c13..b5000aff 100755 --- a/intaro.intarocrm/install/index.php +++ b/intaro.intarocrm/install/index.php @@ -72,6 +72,7 @@ class intaro_intarocrm extends CModule } } + if (!date_default_timezone_get()) { if (!ini_get('date.timezone')) { $APPLICATION->ThrowException(GetMessage("DATE_TIMEZONE_ERR")); diff --git a/intaro.intarocrm/install/step1.php b/intaro.intarocrm/install/step1.php index 8373899c..587334c1 100755 --- a/intaro.intarocrm/install/step1.php +++ b/intaro.intarocrm/install/step1.php @@ -28,7 +28,7 @@