From a77b29cd49325d1f3c269a75e859c4d5ab6b4681 Mon Sep 17 00:00:00 2001 From: ellynoize <111681973+ellynoize@users.noreply.github.com> Date: Thu, 3 Oct 2024 15:46:41 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=B4=D0=BF=D0=B8=D1=81=D0=BA?= =?UTF-8?q?=D0=B0=20=D0=BD=D0=B0=20=D1=81=D0=BE=D0=B1=D1=8B=D1=82=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D1=80=D0=B8=20=D0=BE=D0=B1=D0=BD=D0=BE=D0=B2?= =?UTF-8?q?=D0=BB=D0=B5=D0=BD=D0=B8=D0=B8=20(#365)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 8 ++++---- CHANGELOG.md | 3 +++ intaro.retailcrm/description.ru | 2 +- intaro.retailcrm/install/index.php | 1 - intaro.retailcrm/install/version.php | 4 ++-- .../lib/component/handlers/eventshandlers.php | 3 +++ 6 files changed, 13 insertions(+), 8 deletions(-) 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'])