An event is triggered to allow PowerSync product to customize 'Sales Order Status' form in Magentobefore sending order notes in service Salesforce.
Code Block |
---|
language | php |
---|
title | TNW_Salesforce_Block_Sales_Order_Status_New_Form |
---|
|
Mage::dispatchEvent('tnw_salesforce_order_notes_send_before', array('data' => $_data)); |
...
Code Block |
---|
language | php |
---|
title | Example Observer |
---|
|
<?php
/**
* Class TNW_Salesforce_Model_Observer
*/
class TNW_Salesforce_Model_Observer
{
public function orderNotesSendBefore(Varien_Event_Observer $observer) {
/**
* Array of Salesforce objects
* @var arraystdClass[] $_data
*
* Example:
* array (size=1)
* 310 => // 310 - Magento order status history ID
* object(stdClass)[529]
* public 'ParentId' => string '80124000001479HAAQ' (length=18)
* public 'IsPrivate' => int 0
* public 'Body' => string 'Test comment' (length=12)
* public 'Title' => string 'Test comment' (length=12)
*/
$_data = $observer->getData('data');
// Your custom code
}
} |
...