0

How to get order data of which admin is creating invoice.

I am using this code

observer call on config.xml

<events>
<sales_model_invoice_pay>
    <observers>
       <Karmick_Refer_Model_Observer>
          <type>singleton</type>
          <class>Karmick_Refer_Model_Observer</class>
          <method>changeStatus</method>
       </Karmick_Refer_Model_Observer>
   </observers>
</sales_model_invoice_pay>
</events>

Observer.php

<?php
class Karmick_Refer_Model_Observer{
public function changeStatus(Varien_Event_Observer $observer){
    $due = $observer->getEvent()->getInvoice()->getOrder()->$order->getBaseTotalDue();
    Mage::log($due.'@@@');

}
}
?>

but it seems that nothing is being printed on log

1 Answer 1

1

Try switching your event to sales_order_invoice_pay

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.