| 73 |
if (variable_get('magento_api_log', 0)) watchdog('magento_api', 'Drupal function = %drupal_function, Magento event = %event, Arguments = %args', array('%drupal_function' => 'magento_api_productSaveEventHandler', '%event' => 'catalog_product_save', '%args' => serialize(array($productId))), WATCHDOG_NOTICE, $link = NULL); |
if (variable_get('magento_api_log', 0)) watchdog('magento_api', 'Drupal function = %drupal_function, Magento event = %event, Arguments = %args', array('%drupal_function' => 'magento_api_productSaveEventHandler', '%event' => 'catalog_product_save', '%args' => serialize(array($productId))), WATCHDOG_NOTICE, $link = NULL); |
| 74 |
module_invoke_all('magento_event', 'catalog_product_save', $productId); |
module_invoke_all('magento_event', 'catalog_product_save', $productId); |
| 75 |
} |
} |
| 76 |
catch (Ecxeption $ex) |
catch (Exception $ex) |
| 77 |
{ |
{ |
| 78 |
return services_error(t('Drupal event handler error: ').$ex->getMessage()); |
return services_error(t('Drupal event handler error: ').$ex->getMessage()); |
| 79 |
} |
} |
| 91 |
if (variable_get('magento_api_log', 0)) watchdog('magento_api', 'Drupal function = %drupal_function, Magento event = %event, Arguments = %args', array('%drupal_function' => 'magento_api_productDeleteEventHandler', '%event' => 'catalog_product_delete', '%args' => serialize(array($productId))), WATCHDOG_NOTICE, $link = NULL); |
if (variable_get('magento_api_log', 0)) watchdog('magento_api', 'Drupal function = %drupal_function, Magento event = %event, Arguments = %args', array('%drupal_function' => 'magento_api_productDeleteEventHandler', '%event' => 'catalog_product_delete', '%args' => serialize(array($productId))), WATCHDOG_NOTICE, $link = NULL); |
| 92 |
module_invoke_all('magento_event', 'catalog_product_delete', $productId); |
module_invoke_all('magento_event', 'catalog_product_delete', $productId); |
| 93 |
} |
} |
| 94 |
catch (Ecxeption $ex) |
catch (Exception $ex) |
| 95 |
{ |
{ |
| 96 |
return services_error(t('Drupal event handler error: ').$ex->getMessage()); |
return services_error(t('Drupal event handler error: ').$ex->getMessage()); |
| 97 |
} |
} |
| 109 |
if (variable_get('magento_api_log', 0)) watchdog('magento_api', 'Drupal function = %drupal_function, Magento event = %event, Arguments = %args', array('%drupal_function' => 'magento_api_productStatusUpdateEventHandler', '%event' => 'product_status_update', '%args' => serialize(array($productId))), WATCHDOG_NOTICE, $link = NULL); |
if (variable_get('magento_api_log', 0)) watchdog('magento_api', 'Drupal function = %drupal_function, Magento event = %event, Arguments = %args', array('%drupal_function' => 'magento_api_productStatusUpdateEventHandler', '%event' => 'product_status_update', '%args' => serialize(array($productId))), WATCHDOG_NOTICE, $link = NULL); |
| 110 |
module_invoke_all('magento_event', 'product_status_update', $productId); |
module_invoke_all('magento_event', 'product_status_update', $productId); |
| 111 |
} |
} |
| 112 |
catch (Ecxeption $ex) |
catch (Exception $ex) |
| 113 |
{ |
{ |
| 114 |
return services_error(t('Drupal event handler error: ').$ex->getMessage()); |
return services_error(t('Drupal event handler error: ').$ex->getMessage()); |
| 115 |
} |
} |
| 127 |
if (variable_get('magento_api_log', 0)) watchdog('magento_api', 'Drupal function = %drupal_function, Magento event = %event, Arguments = %args', array('%drupal_function' => 'magento_api_catalogCategorySaveEventHandler', '%event' => 'catalog_category_save', '%args' => serialize(array($tree))), WATCHDOG_NOTICE, $link = NULL); |
if (variable_get('magento_api_log', 0)) watchdog('magento_api', 'Drupal function = %drupal_function, Magento event = %event, Arguments = %args', array('%drupal_function' => 'magento_api_catalogCategorySaveEventHandler', '%event' => 'catalog_category_save', '%args' => serialize(array($tree))), WATCHDOG_NOTICE, $link = NULL); |
| 128 |
module_invoke_all('magento_event', 'catalog_category_save', $tree); |
module_invoke_all('magento_event', 'catalog_category_save', $tree); |
| 129 |
} |
} |
| 130 |
catch (Ecxeption $ex) |
catch (Exception $ex) |
| 131 |
{ |
{ |
| 132 |
return services_error(t('Drupal event handler error: ').$ex->getMessage()); |
return services_error(t('Drupal event handler error: ').$ex->getMessage()); |
| 133 |
} |
} |
| 145 |
if (variable_get('magento_api_log', 0)) watchdog('magento_api', 'Drupal function = %drupal_function, Magento event = %event, Arguments = %args', array('%drupal_function' => 'magento_api_catalogCategoryDeleteEventHandler', '%event' => 'catalog_category_delete', '%args' => serialize(array($tree))), WATCHDOG_NOTICE, $link = NULL); |
if (variable_get('magento_api_log', 0)) watchdog('magento_api', 'Drupal function = %drupal_function, Magento event = %event, Arguments = %args', array('%drupal_function' => 'magento_api_catalogCategoryDeleteEventHandler', '%event' => 'catalog_category_delete', '%args' => serialize(array($tree))), WATCHDOG_NOTICE, $link = NULL); |
| 146 |
module_invoke_all('magento_event', 'catalog_category_delete', $tree); |
module_invoke_all('magento_event', 'catalog_category_delete', $tree); |
| 147 |
} |
} |
| 148 |
catch (Ecxeption $ex) |
catch (Exception $ex) |
| 149 |
{ |
{ |
| 150 |
return services_error(t('Drupal event handler error: ').$ex->getMessage()); |
return services_error(t('Drupal event handler error: ').$ex->getMessage()); |
| 151 |
} |
} |
| 163 |
array('%drupal_function' => 'magento_api_catalogRuleApplyAfterEventHandler', '%event' => 'catalog_rule_apply', '%args' => serialize(array(NULL))), WATCHDOG_NOTICE, $link = NULL); |
array('%drupal_function' => 'magento_api_catalogRuleApplyAfterEventHandler', '%event' => 'catalog_rule_apply', '%args' => serialize(array(NULL))), WATCHDOG_NOTICE, $link = NULL); |
| 164 |
module_invoke_all('magento_event', 'catalog_rule_apply', NULL); |
module_invoke_all('magento_event', 'catalog_rule_apply', NULL); |
| 165 |
} |
} |
| 166 |
catch (Ecxeption $ex) |
catch (Exception $ex) |
| 167 |
{ |
{ |
| 168 |
return services_error(t('Drupal event handler error: ').$ex->getMessage()); |
return services_error(t('Drupal event handler error: ').$ex->getMessage()); |
| 169 |
} |
} |