Versions Compared

Key

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

...

Code Block
languagephp
titleExample Observer
<?php

/**
 * Class TNW_Salesforce_Model_Observer
 */
class TNW_Salesforce_Model_Observer
{
 
    public function invoiceNotesSendAfter(Varien_Event_Observer $observer) {
		/**
		 * Array of Salesforce objects
		 * @var stdClass[] $_data 
		 *
		 * Example:
		 * array (size=1)
		 *   'cart_206'1 => 
		 *     object(stdClass)[600843]
		 *       public 'AcctSeed__Product__cParentId' => string '01t24000003TfxyAAC' (length=18)null
		 *       public 'AcctSeed__Rate__cIsPrivate' => string '321.55' (length=6)int 0
		 *       public 'AcctSeed__Billing__cBody' => null
		 *       public 'AcctSeed__Hours_Units__c' => string '1.0000string 'Custom comment' (length=614)
		 *       public 'AcctSeedERP__Sales_Order_Line__cTitle' => string '80224000001gwzQAAQCustom comment' (length=1814)
		 */
		$_data = $observer->getData('data');

		/**
		 * Array of Results
		 * @var stdClass[] $_result
		 * Example:
		 * array (size=1)
		 *   01 => 
		 *     object(stdClass)[735855]
		 *       public 'successcreated' => boolean falsetrue
		 *       public 'orgIdid' => string '00D24000000k20eEAA00224000002qNvJAAU' (length=18)
		 *       public 'createdsuccess' => boolean falsetrue
		 */
		$_result = $observer->getData('result');

		// Your custom code
    }
 
}

...