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

upd orderEdit method

This commit is contained in:
Grisha Pomadchin 2013-08-05 14:49:51 +04:00
parent 1a674a91be
commit 47452c4f25
2 changed files with 0 additions and 17 deletions

View File

@ -118,29 +118,17 @@ class ICrmOrderEvent {
ICrmOrderActions::eventLog('ICrmOrderEvent::onSaleCancelOrder', 'catalog', 'module not found');
return true;
}
$arFields = CSaleOrder::GetById($ID);
if (empty($arFields)) {
//handle err
self::eventLog('ICrmOrderEvent::onSaleCancelOrder', 'empty($arFields)', 'incorrect order');
return true;
}
$api_host = COption::GetOptionString(self::$MODULE_ID, self::$CRM_API_HOST_OPTION, 0);
$api_key = COption::GetOptionString(self::$MODULE_ID, self::$CRM_API_KEY_OPTION, 0);
//saved cat params
$optionsOrderTypes = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_ORDER_TYPES_ARR, 0));
$optionsPayStatuses = unserialize(COption::GetOptionString(self::$MODULE_ID, self::$CRM_PAYMENT_STATUSES, 0)); // --statuses
$api = new IntaroCrm\RestApi($api_host, $api_key);
$order = array(
'externalId' => (int) $ID,
'customerId' => (int) $arFields['USER_ID'],
'orderType' => $optionsOrderTypes[$arFields['PERSON_TYPE_ID']],
'status' => $optionsPayStatuses[$cancel],
'statusComment' => ICrmOrderActions::toJSON($reason)
);

View File

@ -1,5 +0,0 @@
<?
$arModuleVersion = array(
'VERSION' => '0.4.6',
'VERSION_DATE' => '2013-07-25 15:35:00',
);