Skip to main content

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>

i want order id in observe function but i am getting null i 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;}

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>

I want order id in observe function but I am getting null I 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;
}

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>
added 540 characters in body
Source Link
Piyush
  • 149
  • 1
  • 17

i want order id in observe function but i am getting null i 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;}

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>

i want order id in observe function but i am getting null i am using this code

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;}

i want order id in observe function but i am getting null i 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;}

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>

Source Link
Piyush
  • 149
  • 1
  • 17

get order id in Observer on sales_order_invoice_save_after

i want order id in observe function but i am getting null i am using this code

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;}