Fixed sending empty order when deleting order from CMS
This commit is contained in:
parent
1c5a15d30b
commit
fa706de2e1
@ -1,3 +1,6 @@
|
||||
## 2019-07-01 v.2.4.8
|
||||
* Исправлена отправка пустого заказа при удалении заказа из СMS
|
||||
|
||||
## 2019-03-28 v.2.4.7
|
||||
* Добавлено удаление в системе типа цены у товара для неактивного типа цены на сайте
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user