event fixes
This commit is contained in:
parent
6c2552881b
commit
66c0d8998b
@ -32,7 +32,7 @@ class ICrmOrderEvent {
|
||||
* @param mixed $ID - Order id
|
||||
* @param mixed $arFields - Order arFields
|
||||
*/
|
||||
function onBeforeUpdateOrder($ID, $arFields) {
|
||||
function onUpdateOrder($ID, $arFields) {
|
||||
|
||||
if(isset($GLOBALS['INTARO_CRM_ORDER_ADD']) && $GLOBALS['INTARO_CRM_ORDER_ADD'])
|
||||
return;
|
||||
|
@ -1039,7 +1039,7 @@ class intaro_intarocrm extends CModule {
|
||||
UnRegisterModuleDependences("sale", "OnSalePayOrder", $this->MODULE_ID, "ICrmOrderEvent", "onSalePayOrder");
|
||||
UnRegisterModuleDependences("sale", "OnSaleCancelOrder", $this->MODULE_ID, "ICrmOrderEvent", "onSaleCancelOrder");
|
||||
UnRegisterModuleDependences("sale", "OnOrderNewSendEmail", $this->MODULE_ID, "ICrmOrderEvent", "onSendOrderMail");
|
||||
UnRegisterModuleDependences("sale", "OnBeforeOrderUpdate", $this->MODULE_ID, "ICrmOrderEvent", "onBeforeUpdateOrder");
|
||||
UnRegisterModuleDependences("sale", "OnOrderUpdate", $this->MODULE_ID, "ICrmOrderEvent", "onUpdateOrder");
|
||||
UnRegisterModuleDependences("sale", "OnBeforeOrderAdd", $this->MODULE_ID, "ICrmOrderEvent", "onBeforeOrderAdd");
|
||||
if (CModule::IncludeModule("catalog")) {
|
||||
if (file_exists($_SERVER['DOCUMENT_ROOT'] . '/bitrix/php_interface/include/catalog_export/' . $this->INTARO_CRM_EXPORT . '_run.php')) {
|
||||
|
@ -218,13 +218,13 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) {
|
||||
if (($orderDischarge != $previousDischarge) && ($orderDischarge == 0)) {
|
||||
// remove depenedencies
|
||||
UnRegisterModuleDependences("sale", "OnOrderNewSendEmail", $mid, "ICrmOrderEvent", "onSendOrderMail");
|
||||
UnRegisterModuleDependences("sale", "OnBeforeOrderUpdate", $mid, "ICrmOrderEvent", "onBeforeUpdateOrder");
|
||||
UnRegisterModuleDependences("sale", "OnOrderUpdate", $mid, "ICrmOrderEvent", "onUpdateOrder");
|
||||
UnRegisterModuleDependences("sale", "OnBeforeOrderAdd", $mid, "ICrmOrderEvent", "onBeforeOrderAdd");
|
||||
|
||||
} else if (($orderDischarge != $previousDischarge) && ($orderDischarge == 1)) {
|
||||
// event dependencies
|
||||
RegisterModuleDependences("sale", "OnOrderNewSendEmail", $mid, "ICrmOrderEvent", "onSendOrderMail");
|
||||
RegisterModuleDependences("sale", "OnBeforeOrderUpdate", $mid, "ICrmOrderEvent", "onBeforeUpdateOrder");
|
||||
RegisterModuleDependences("sale", "OnOrderUpdate", $mid, "ICrmOrderEvent", "onUpdateOrder");
|
||||
RegisterModuleDependences("sale", "OnBeforeOrderAdd", $mid, "ICrmOrderEvent", "onBeforeOrderAdd");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user