diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f9ba3c3..be21d4c7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,11 +20,11 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php-version: ['7.4', '8.0'] + php-version: ['8.1'] bitrix-edition: ['small_business_encode', 'business_encode'] services: mysql: - image: mysql:5.7 + image: mysql:8.0 env: MYSQL_ROOT_PASSWORD: ${{ env.DB_BITRIX_PASS }} MYSQL_DATABASE: bitrix @@ -68,10 +68,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - - name: Setup PHP 7.2 + - name: Setup PHP 8.1 uses: shivammathur/setup-php@v2 with: - php-version: 7.2 + php-version: 8.1 ini-values: short_open_tag=On, mbstring.func_overload=2, mbstring.internal_encoding="UTF-8" - name: Build release run: | diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b718ad8..440f9e0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 2024-10-03 v6.5.32 +- Исправлена подписка на событие создания заказа при обновлении + ## 2024-09-23 v6.5.31 - Добавлено логирование ответа от API при неудачном создании заказа diff --git a/intaro.retailcrm/description.ru b/intaro.retailcrm/description.ru index e15f0f21..293bec97 100644 --- a/intaro.retailcrm/description.ru +++ b/intaro.retailcrm/description.ru @@ -1 +1 @@ -- Добавлено логирование ответа от API при неудачном создании заказа +- Исправлена подписка на событие сохранения заказа при обновлении diff --git a/intaro.retailcrm/install/index.php b/intaro.retailcrm/install/index.php index 12a4c52d..59d7adea 100644 --- a/intaro.retailcrm/install/index.php +++ b/intaro.retailcrm/install/index.php @@ -1090,7 +1090,6 @@ class intaro_retailcrm extends CModule RegisterModuleDependences('sale', 'OnSalePaymentEntityDeleted', $this->MODULE_ID, 'RetailCrmEvent', 'paymentDelete'); RegisterModuleDependences('main', 'OnAfterUserRegister', $this->MODULE_ID, 'RetailCrmEvent', 'OnAfterUserRegister'); RegisterModuleDependences('main', 'OnAfterUserAdd', $this->MODULE_ID, 'RetailCrmEvent', 'OnAfterUserAdd'); - RegisterModuleDependences('sale', 'OnSaleOrderSaved', $this->MODULE_ID, 'RetailCrmEvent', 'orderSave', 99); COption::SetOptionString($this->MODULE_ID, Constants::CRM_CATALOG_BASE_PRICE, htmlspecialchars(trim($_POST['price-types']))); COption::SetOptionString($this->MODULE_ID, Constants::CRM_INVENTORIES_UPLOAD, 'N'); diff --git a/intaro.retailcrm/install/version.php b/intaro.retailcrm/install/version.php index bc3cad90..f96b8ae8 100644 --- a/intaro.retailcrm/install/version.php +++ b/intaro.retailcrm/install/version.php @@ -1,6 +1,6 @@ '6.5.31', - 'VERSION_DATE' => '2024-09-23 17:00:00' + 'VERSION' => '6.5.32', + 'VERSION_DATE' => '2024-10-03 17:00:00' ]; diff --git a/intaro.retailcrm/lib/component/handlers/eventshandlers.php b/intaro.retailcrm/lib/component/handlers/eventshandlers.php index f084b75f..7e686c3e 100644 --- a/intaro.retailcrm/lib/component/handlers/eventshandlers.php +++ b/intaro.retailcrm/lib/component/handlers/eventshandlers.php @@ -132,6 +132,9 @@ class EventsHandlers try { /** @var Order $order */ $order = $event->getParameter('ENTITY'); + + $saveResult = RetailCrmEvent::orderSave($order); + Utils::handleApiErrors($saveResult); $isBonusInput = ( !empty($_POST['bonus-input'])