Mage_Payment_Model_Observer Class Reference

List of all members.

Public Member Functions

 salesOrderBeforeSave ($observer)


Detailed Description

Definition at line 34 of file Observer.php.


Member Function Documentation

salesOrderBeforeSave ( observer  ) 

Set forced canCreditmemo flag

Parameters:
Varien_Event_Observer $observer
Returns:
Mage_Payment_Model_Observer

Definition at line 42 of file Observer.php.

00043     {
00044         $order = $observer->getEvent()->getOrder();
00045 
00046         if ($order->getPayment()->getMethodInstance()->getCode() != 'free') {
00047             return $this;
00048         }
00049 
00050         if ($order->canUnhold()) {
00051             return $this;
00052         }
00053 
00054         if ($order->getState() === Mage_Sales_Model_Order::STATE_CANCELED ||
00055             $order->getState() === Mage_Sales_Model_Order::STATE_CLOSED ) {
00056             return $this;
00057         }
00058 
00059         $order->setForcedCanCreditmemo(true);
00060         return $this;
00061     }


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

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