Created
May 1, 2014 16:11
-
-
Save ryaan-anthony/0755645a50e61f13578e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public function sendVendorNotification($po, $comment='') | |
| { | |
| $vendor = $po->getVendor(); | |
| $method = $vendor->getNewOrderNotifications(); | |
| if (!$method || $method=='0') { | |
| return $this; | |
| } | |
| $data = compact('vendor', 'po', 'method'); | |
| if ($method=='1') { | |
| $this->sendNewPoNotificationEmail($po, $comment); | |
| } else { | |
| $config = Mage::getConfig()->getNode('global/udropship/notification_methods/'.$method); | |
| if ($config) { | |
| $cb = explode('::', (string)$config->callback); | |
| $obj = Mage::getSingleton($cb[0]); | |
| $method = $cb[1]; | |
| $obj->$method($data); | |
| } | |
| } | |
| Mage::dispatchEvent('udpo_send_vendor_notification', $data); | |
| return $this; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment