iI want order id in observe function but iI am getting null iI am using this code Observe.php
public function invoiceexport(Varien_Event_Observer $event=null){ $_helper = Mage::helper('Nino_invoiceexport'); $importStartDateTime = date('Y-m-d H:i:s'); $orders = $event->getOrder(); print_r($orders);die;}
public function invoiceexport(Varien_Event_Observer $event=null){
$_helper = Mage::helper('Nino_invoiceexport');
$importStartDateTime = date('Y-m-d H:i:s');
$orders = $event->getOrder();
print_r($orders);
die;
}
My config.xml is as :
<events> <sales_order_invoice_save_after> <observers> <Nino_invoiceexport_order_invoice_save_after> <type>singleton</type> <class>Nino_InvoiceExport_Model_Observer</class> <method>invoiceexport</method> </Nino_invoiceexport_order_invoice_save_after> </observers> </sales_order_invoice_save_after> </events>
<events>
<sales_order_invoice_save_after>
<observers>
<Nino_invoiceexport_order_invoice_save_after>
<type>singleton</type>
<class>Nino_InvoiceExport_Model_Observer</class>
<method>invoiceexport</method>
</Nino_invoiceexport_order_invoice_save_after>
</observers>
</sales_order_invoice_save_after>
</events>