1
0
mirror of synced 2024-11-25 14:56:09 +03:00

Merge pull request #69 from Evgeniy-Goroh/master

Fixed sending empty order when deleting order from CMS
This commit is contained in:
Alex Lushpai 2019-07-03 10:53:13 +03:00 committed by GitHub
commit 65e5085275
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 0 deletions

View File

@ -2,6 +2,9 @@ language: php
sudo: false
services:
- mysql
php:
- 7.1
- 7.2

View File

@ -1,3 +1,6 @@
## 2019-07-01 v.2.4.8
* Исправлена отправка пустого заказа при удалении заказа из СMS
## 2019-03-28 v.2.4.7
* Добавлено удаление в системе типа цены у товара для неактивного типа цены на сайте

View File

@ -65,6 +65,13 @@ class RetailCrmEvent
$GLOBALS['RETAILCRM_ORDER_OLD_EVENT'] = true;
if (($arFields['CANCELED'] == 'Y')
&& (sizeof($arFields['BASKET_ITEMS']) == 0 )
&& (sizeof($arFields['ORDER_PROP']) == 0 )
) {
$GLOBALS['ORDER_DELETE_USER_ADMIN'] = true;
}
return;
}
@ -88,6 +95,10 @@ class RetailCrmEvent
*/
function orderSave($event)
{
if (true == $GLOBALS['ORDER_DELETE_USER_ADMIN']) {
return false;
}
if ($GLOBALS['RETAILCRM_ORDER_OLD_EVENT'] === false
&& $GLOBALS['RETAIL_CRM_HISTORY'] === true
&& $GLOBALS['RETAILCRM_ORDER_DELETE'] === true