Mage_GoogleCheckout_Model_Observer Class Reference

List of all members.

Public Member Functions

 salesOrderShipmentTrackSaveAfter (Varien_Event_Observer $observer)
 salesOrderShipmentSaveAfter (Varien_Event_Observer $observer)


Detailed Description

Definition at line 34 of file Observer.php.


Member Function Documentation

salesOrderShipmentSaveAfter ( Varien_Event_Observer observer  ) 

Definition at line 51 of file Observer.php.

00052     {
00053         $googleShipmentNames = array('googlecheckout_carrier', 'googlecheckout_merchant', 'googlecheckout_flatrate', 'googlecheckout_pickup');
00054 
00055         $shipment = $observer->getEvent()->getShipment();
00056         $order = $shipment->getOrder();
00057 
00058         if (!in_array($order->getShippingMethod(), $googleShipmentNames)) {
00059             return;
00060         }
00061 
00062         $items = array();
00063 
00064         foreach ($shipment->getAllItems() as $item) {
00065             if ($item->getOrderItem()->getParentItemId()) {
00066                 continue;
00067             }
00068             $items[] = $item->getSku();
00069         }
00070 
00071         if ($items) {
00072             Mage::getModel('googlecheckout/api')
00073                 ->setStoreId($order->getStoreId())
00074                 ->shipItems($order->getExtOrderId(), $items);
00075         }
00076     }

salesOrderShipmentTrackSaveAfter ( Varien_Event_Observer observer  ) 

Definition at line 36 of file Observer.php.

00037     {
00038         $track = $observer->getEvent()->getTrack();
00039 
00040         $order = $track->getShipment()->getOrder();
00041 
00042         if ($order->getShippingMethod()!='googlecheckout_carrier') {
00043             return;
00044         }
00045 
00046         Mage::getModel('googlecheckout/api')
00047             ->setStoreId($order->getStoreId())
00048             ->deliver($order->getExtOrderId(), $track->getCarrierCode(), $track->getNumber());
00049     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:17 2009 for Magento by  doxygen 1.5.8