1
0
mirror of synced 2024-11-21 21:06:09 +03:00

Исправлена подписка на событие при обновлении (#365)

This commit is contained in:
ellynoize 2024-10-03 15:46:41 +06:00 committed by GitHub
parent c1deb9e91e
commit a77b29cd49
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 13 additions and 8 deletions

View File

@ -20,11 +20,11 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
php-version: ['7.4', '8.0'] php-version: ['8.1']
bitrix-edition: ['small_business_encode', 'business_encode'] bitrix-edition: ['small_business_encode', 'business_encode']
services: services:
mysql: mysql:
image: mysql:5.7 image: mysql:8.0
env: env:
MYSQL_ROOT_PASSWORD: ${{ env.DB_BITRIX_PASS }} MYSQL_ROOT_PASSWORD: ${{ env.DB_BITRIX_PASS }}
MYSQL_DATABASE: bitrix MYSQL_DATABASE: bitrix
@ -68,10 +68,10 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Setup PHP 7.2 - name: Setup PHP 8.1
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
php-version: 7.2 php-version: 8.1
ini-values: short_open_tag=On, mbstring.func_overload=2, mbstring.internal_encoding="UTF-8" ini-values: short_open_tag=On, mbstring.func_overload=2, mbstring.internal_encoding="UTF-8"
- name: Build release - name: Build release
run: | run: |

View File

@ -1,3 +1,6 @@
## 2024-10-03 v6.5.32
- Исправлена подписка на событие создания заказа при обновлении
## 2024-09-23 v6.5.31 ## 2024-09-23 v6.5.31
- Добавлено логирование ответа от API при неудачном создании заказа - Добавлено логирование ответа от API при неудачном создании заказа

View File

@ -1 +1 @@
- Добавлено логирование ответа от API при неудачном создании заказа - Исправлена подписка на событие сохранения заказа при обновлении

View File

@ -1090,7 +1090,6 @@ class intaro_retailcrm extends CModule
RegisterModuleDependences('sale', 'OnSalePaymentEntityDeleted', $this->MODULE_ID, 'RetailCrmEvent', 'paymentDelete'); RegisterModuleDependences('sale', 'OnSalePaymentEntityDeleted', $this->MODULE_ID, 'RetailCrmEvent', 'paymentDelete');
RegisterModuleDependences('main', 'OnAfterUserRegister', $this->MODULE_ID, 'RetailCrmEvent', 'OnAfterUserRegister'); RegisterModuleDependences('main', 'OnAfterUserRegister', $this->MODULE_ID, 'RetailCrmEvent', 'OnAfterUserRegister');
RegisterModuleDependences('main', 'OnAfterUserAdd', $this->MODULE_ID, 'RetailCrmEvent', 'OnAfterUserAdd'); 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_CATALOG_BASE_PRICE, htmlspecialchars(trim($_POST['price-types'])));
COption::SetOptionString($this->MODULE_ID, Constants::CRM_INVENTORIES_UPLOAD, 'N'); COption::SetOptionString($this->MODULE_ID, Constants::CRM_INVENTORIES_UPLOAD, 'N');

View File

@ -1,6 +1,6 @@
<?php <?php
$arModuleVersion = [ $arModuleVersion = [
'VERSION' => '6.5.31', 'VERSION' => '6.5.32',
'VERSION_DATE' => '2024-09-23 17:00:00' 'VERSION_DATE' => '2024-10-03 17:00:00'
]; ];

View File

@ -133,6 +133,9 @@ class EventsHandlers
/** @var Order $order */ /** @var Order $order */
$order = $event->getParameter('ENTITY'); $order = $event->getParameter('ENTITY');
$saveResult = RetailCrmEvent::orderSave($order);
Utils::handleApiErrors($saveResult);
$isBonusInput = ( $isBonusInput = (
!empty($_POST['bonus-input']) !empty($_POST['bonus-input'])
&& !empty($_POST['available-bonuses']) && !empty($_POST['available-bonuses'])