Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

An event is triggered to allow PowerSync product to customize 'Sales Order Status' form in Magentoafter save the comment to the order.

Code Block
languagephp
titleTNW_Salesforce_Block_Sales_Order_Status_New_Form
Mage::dispatchEvent('tnw_salesforce_order_comments_save_beforeafter', array('oid' => $_oid, 'note' => $_note, 'type' => 'Order'));

...

Code Block
languagexml
titleExample Config
<?xml version="1.0"?>
<config>
    <global>
        <events>
            <tnw_salesforce_order_comments_save_before>after>
                <observers>
                    <tnw_salesforce_order_comments_save_before>after>
                        <class>tnw_salesforce/observer</class>
                        <method>orderCommentsSaveBefore<<method>orderCommentsSaveAfter</method>
                    </tnw_salesforce_order_comments_save_before>after>
                </observers>
            </tnw_salesforce_order_comments_save_before>after>
        </events>
    </global>
</config>
Code Block
languagephp
titleExample Observer
<?php

/**
 * Class TNW_Salesforce_Model_Observer
 */
class TNW_Salesforce_Model_Observer
{

    public function orderCommentsSaveBeforeorderCommentsSaveAfter(Varien_Event_Observer $observer) {
		/**
		 * Magento Order id
		 * @var int $_oid 
         * 
         * Example:
         *   int(143)
		 */
		$_oid = $observer->getData('oid');

		/** 
		 * Magento Note oject
		 * @var mixedMage_Sales_Model_Order_Status_History $_note
		 */
		$_note = $observer->getData('note');

		/** 
		 * Order
		 * @var string $_type 
         * 
         * Example:
         *   string 'Order'
		 */
		$_type = $observer->getData('type');

		// Your custom code
    }
 
}

 

Filter by label (Content by label)
showLabelsfalse
max5
spacesPOW
showSpacefalse
sortmodified
reversetrue
typepage
cqllabel in ("magento","events") and type = "page" and space = "POW"
labelsevents magento

...