Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 2025-01-14 v6.6.2
- Исправлена выгрузка архива заказов при установке модуля

## 2024-12-17 v6.6.1
- Исправлены API методы по взаимодействию с пользовательскими полями и справочниками

Expand Down
2 changes: 1 addition & 1 deletion intaro.retailcrm/description.ru
Original file line number Diff line number Diff line change
@@ -1 +1 @@
- Исправлены API методы по взаимодействию с пользовательскими полями и справочниками
- Исправлена выгрузка архива заказов при установке модуля
84 changes: 15 additions & 69 deletions intaro.retailcrm/install/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
return false;
}

include (__DIR__ . '/../lib/component/advanced/installertrait.php');
require_once(__DIR__ . '/../lib/component/advanced/installertrait.php');

class intaro_retailcrm extends CModule
{
Expand All @@ -57,7 +57,8 @@ public function __construct()
$path = substr($path, 0, strlen($path) - strlen('/index.php'));
$this->INSTALL_PATH = $path;

include($path . '/version.php');
require_once($path . '/version.php');

$this->MODULE_VERSION = $arModuleVersion['VERSION'];
$this->MODULE_VERSION_DATE = $arModuleVersion['VERSION_DATE'];
$this->MODULE_NAME = GetMessage('RETAIL_MODULE_NAME');
Expand Down Expand Up @@ -87,6 +88,18 @@ public function loadDeps()
*/
function DoInstall()
{
try {
require_once('install_deps.php');
} catch (Error $exception) {
RCrmActions::eventLog(
'RetailCRM module install error',
'intaro.retailcrm',
$exception->getCode() . ': ' . $exception->getMessage()
);

return false;
}

global $APPLICATION, $step, $arResult;

if (!in_array('curl', get_loaded_extensions(), true)) {
Expand All @@ -112,57 +125,6 @@ function DoInstall()
return false;
}

include($this->INSTALL_PATH . '/../lib/component/apiclient/traits/baseclienttrait.php');
include($this->INSTALL_PATH . '/../lib/component/apiclient/traits/customerstrait.php');
include($this->INSTALL_PATH . '/../lib/component/apiclient/traits/customerscorporatetrait.php');
include($this->INSTALL_PATH . '/../lib/component/apiclient/traits/loyaltytrait.php');
include($this->INSTALL_PATH . '/../lib/component/apiclient/traits/ordertrait.php');
include($this->INSTALL_PATH . '/../lib/component/apiclient/traits/carttrait.php');
include($this->INSTALL_PATH . '/../classes/general/Http/Client.php');
include($this->INSTALL_PATH . '/../classes/general/Response/ApiResponse.php');
include($this->INSTALL_PATH . '/../classes/general/RCrmActions.php');
include($this->INSTALL_PATH . '/../classes/general/user/RetailCrmUser.php');
include($this->INSTALL_PATH . '/../classes/general/events/RetailCrmEvent.php');
require_once $this->INSTALL_PATH . '/../classes/general/RetailcrmConfigProvider.php';
include($this->INSTALL_PATH . '/../lib/model/bitrix/xml/offerparam.php');
include($this->INSTALL_PATH . '/../lib/icml/settingsservice.php');
include($this->INSTALL_PATH . '/../lib/component/agent.php');
include($this->INSTALL_PATH . '/../lib/model/bitrix/xml/selectparams.php');
include($this->INSTALL_PATH . '/../lib/model/bitrix/xml/unit.php');
include($this->INSTALL_PATH . '/../lib/model/bitrix/xml/xmlcategory.php');
include($this->INSTALL_PATH . '/../lib/model/bitrix/xml/xmldata.php');
include($this->INSTALL_PATH . '/../lib/model/bitrix/xml/xmloffer.php');
include($this->INSTALL_PATH . '/../lib/model/bitrix/xml/xmlsetup.php');
include($this->INSTALL_PATH . '/../lib/model/bitrix/xml/xmlsetupprops.php');
include($this->INSTALL_PATH . '/../lib/model/bitrix/xml/xmlsetuppropscategories.php');
include($this->INSTALL_PATH . '/../lib/icml/icmldirector.php');
include($this->INSTALL_PATH . '/../lib/icml/icmlwriter.php');
include($this->INSTALL_PATH . '/../lib/icml/queryparamsmolder.php');
include($this->INSTALL_PATH . '/../lib/icml/xmlcategorydirector.php');
include($this->INSTALL_PATH . '/../lib/icml/xmlcategoryfactory.php');
include($this->INSTALL_PATH . '/../lib/icml/xmlofferdirector.php');
include($this->INSTALL_PATH . '/../lib/icml/xmlofferbuilder.php');
include($this->INSTALL_PATH . '/../lib/icml/utils/icmlutils.php');
include($this->INSTALL_PATH . '/../lib/repository/catalogrepository.php');
include($this->INSTALL_PATH . '/../lib/repository/filerepository.php');
include($this->INSTALL_PATH . '/../lib/repository/hlrepository.php');
include($this->INSTALL_PATH . '/../lib/repository/measurerepository.php');
include($this->INSTALL_PATH . '/../lib/repository/siterepository.php');
include($this->INSTALL_PATH . '/../lib/service/hl.php');
include($this->INSTALL_PATH . '/../lib/model/bitrix/orm/catalogiblockinfo.php');
include($this->INSTALL_PATH . '/../lib/model/bitrix/orm/iblockcatalog.php');
include($this->INSTALL_PATH . '/../classes/general/Exception/InvalidJsonException.php');
include($this->INSTALL_PATH . '/../classes/general/Exception/CurlException.php');
include($this->INSTALL_PATH . '/../classes/general/RestNormalizer.php');
include($this->INSTALL_PATH . '/../classes/general/Logger.php');
include($this->INSTALL_PATH . '/../classes/general/services/RetailCrmService.php');
include($this->INSTALL_PATH . '/../lib/component/constants.php');
$version = COption::GetOptionString($this->MODULE_ID, Constants::CRM_API_VERSION, 0);
include($this->INSTALL_PATH . '/../classes/general/ApiClient_v5.php');
include($this->INSTALL_PATH . '/../classes/general/order/RetailCrmOrder_v5.php');
include($this->INSTALL_PATH . '/../classes/general/history/RetailCrmHistory_v5.php');
include($this->INSTALL_PATH . '/../classes/general/cart/RetailCrmCart_v5.php');

$step = (int) $_REQUEST['step'];

if (file_exists($this->INSTALL_PATH . '/../classes/general/config/options.xml')) {
Expand Down Expand Up @@ -191,22 +153,6 @@ function DoInstall()
}
}

include($this->INSTALL_PATH . '/../lib/model/bitrix/abstractmodelproxy.php');
include($this->INSTALL_PATH . '/../lib/model/bitrix/orderprops.php');
include($this->INSTALL_PATH . '/../lib/model/bitrix/tomodule.php');
include($this->INSTALL_PATH . '/../lib/repository/abstractrepository.php');
include($this->INSTALL_PATH . '/../lib/repository/orderpropsrepository.php');
include($this->INSTALL_PATH . '/../lib/repository/persontyperepository.php');
include($this->INSTALL_PATH . '/../lib/repository/tomodulerepository.php');
include($this->INSTALL_PATH . '/../lib/model/bitrix/orm/tomodule.php');
include($this->INSTALL_PATH . '/../lib/model/bitrix/agreement.php');
include($this->INSTALL_PATH . '/../lib/repository/agreementrepository.php');
include($this->INSTALL_PATH . '/../lib/service/orderloyaltydataservice.php');
include($this->INSTALL_PATH . '/../lib/service/currencyservice.php');
include($this->INSTALL_PATH . '/../lib/component/factory/clientfactory.php');
include($this->INSTALL_PATH . '/../lib/component/apiclient/clientadapter.php');
include($this->INSTALL_PATH . '/../lib/component/advanced/loyaltyinstaller.php');

$this->installExport();
$this->subscriptionSetup();

Expand Down
70 changes: 70 additions & 0 deletions intaro.retailcrm/install/install_deps.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
<?php

require_once($this->INSTALL_PATH . '/../lib/component/apiclient/traits/baseclienttrait.php');
require_once($this->INSTALL_PATH . '/../lib/component/apiclient/traits/customerstrait.php');
require_once($this->INSTALL_PATH . '/../lib/component/apiclient/traits/customerscorporatetrait.php');
require_once($this->INSTALL_PATH . '/../lib/component/apiclient/traits/loyaltytrait.php');
require_once($this->INSTALL_PATH . '/../lib/component/apiclient/traits/ordertrait.php');
require_once($this->INSTALL_PATH . '/../lib/component/apiclient/traits/carttrait.php');
require_once($this->INSTALL_PATH . '/../classes/general/Http/Client.php');
require_once($this->INSTALL_PATH . '/../classes/general/Response/ApiResponse.php');
require_once($this->INSTALL_PATH . '/../classes/general/RCrmActions.php');
require_once($this->INSTALL_PATH . '/../classes/general/user/RetailCrmUser.php');
require_once($this->INSTALL_PATH . '/../classes/general/events/RetailCrmEvent.php');
require_once $this->INSTALL_PATH . '/../classes/general/RetailcrmConfigProvider.php';
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/xml/offerparam.php');
require_once($this->INSTALL_PATH . '/../lib/icml/settingsservice.php');
require_once($this->INSTALL_PATH . '/../lib/component/agent.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/xml/selectparams.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/xml/unit.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/xml/xmlcategory.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/xml/xmldata.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/xml/xmloffer.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/xml/xmlsetup.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/xml/xmlsetupprops.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/xml/xmlsetuppropscategories.php');
require_once($this->INSTALL_PATH . '/../lib/icml/icmldirector.php');
require_once($this->INSTALL_PATH . '/../lib/icml/icmlwriter.php');
require_once($this->INSTALL_PATH . '/../lib/icml/queryparamsmolder.php');
require_once($this->INSTALL_PATH . '/../lib/icml/xmlcategorydirector.php');
require_once($this->INSTALL_PATH . '/../lib/icml/xmlcategoryfactory.php');
require_once($this->INSTALL_PATH . '/../lib/icml/xmlofferdirector.php');
require_once($this->INSTALL_PATH . '/../lib/icml/xmlofferbuilder.php');
require_once($this->INSTALL_PATH . '/../lib/repository/catalogrepository.php');
require_once($this->INSTALL_PATH . '/../lib/repository/filerepository.php');
require_once($this->INSTALL_PATH . '/../lib/repository/hlrepository.php');
require_once($this->INSTALL_PATH . '/../lib/repository/measurerepository.php');
require_once($this->INSTALL_PATH . '/../lib/repository/siterepository.php');
require_once($this->INSTALL_PATH . '/../lib/service/hl.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/orm/catalogiblockinfo.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/orm/iblockcatalog.php');
require_once($this->INSTALL_PATH . '/../classes/general/Exception/InvalidJsonException.php');
require_once($this->INSTALL_PATH . '/../classes/general/Exception/CurlException.php');
require_once($this->INSTALL_PATH . '/../classes/general/RestNormalizer.php');
require_once($this->INSTALL_PATH . '/../classes/general/Logger.php');
require_once($this->INSTALL_PATH . '/../classes/general/services/RetailCrmService.php');
require_once($this->INSTALL_PATH . '/../lib/component/constants.php');
require_once($this->INSTALL_PATH . '/../classes/general/ApiClient_v5.php');
require_once($this->INSTALL_PATH . '/../classes/general/order/RetailCrmOrder_v5.php');
require_once($this->INSTALL_PATH . '/../classes/general/history/RetailCrmHistory_v5.php');
require_once($this->INSTALL_PATH . '/../classes/general/cart/RetailCrmCart_v5.php');
require_once($this->INSTALL_PATH . '/../lib/service/managerservice.php');
require_once($this->INSTALL_PATH . '/../lib/service/loyaltyservice.php');
require_once($this->INSTALL_PATH . '/../lib/service/loyaltyaccountservice.php');
require_once($this->INSTALL_PATH . '/../lib/repository/managerrepository.php');
require_once($this->INSTALL_PATH . '/../classes/general/services/BitrixOrderService.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/abstractmodelproxy.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/orderprops.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/tomodule.php');
require_once($this->INSTALL_PATH . '/../lib/repository/abstractrepository.php');
require_once($this->INSTALL_PATH . '/../lib/repository/orderpropsrepository.php');
require_once($this->INSTALL_PATH . '/../lib/repository/persontyperepository.php');
require_once($this->INSTALL_PATH . '/../lib/repository/tomodulerepository.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/orm/tomodule.php');
require_once($this->INSTALL_PATH . '/../lib/model/bitrix/agreement.php');
require_once($this->INSTALL_PATH . '/../lib/repository/agreementrepository.php');
require_once($this->INSTALL_PATH . '/../lib/service/orderloyaltydataservice.php');
require_once($this->INSTALL_PATH . '/../lib/service/currencyservice.php');
require_once($this->INSTALL_PATH . '/../lib/component/factory/clientfactory.php');
require_once($this->INSTALL_PATH . '/../lib/component/apiclient/clientadapter.php');
require_once($this->INSTALL_PATH . '/../lib/component/advanced/loyaltyinstaller.php');
4 changes: 2 additions & 2 deletions intaro.retailcrm/install/version.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

$arModuleVersion = [
'VERSION' => '6.6.1',
'VERSION_DATE' => '2024-12-17 13:00:00'
'VERSION' => '6.6.2',
'VERSION_DATE' => '2025-01-14 13:00:00'
];
2 changes: 1 addition & 1 deletion intaro.retailcrm/lib/component/constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/
class Constants
{
public const MODULE_VERSION = '6.6.1';
public const MODULE_VERSION = '6.6.2';
public const CRM_PURCHASE_PRICE_NULL = 'purchasePrice_null';
public const BITRIX_USER_ID_PREFIX = 'bitrixUserId-';
public const CRM_USERS_MAP = 'crm_users_map';
Expand Down
Loading