Wednesday, August 5, 2015

Get all invoices of order in magento

 $orderId=10001;
$order = Mage::getModel('sales/order')->load($orderId);
if ($order->hasInvoices())
{
$invoiceArray = array();

foreach ($order->getInvoiceCollection() as $invoice)
{
//to see details of  invoice
echo "<pre>";
print_r($invoice);
echo "</pre>";
$invoiceArray[] = $invoice->getIncrementId();
}
}

No comments:

Post a Comment

Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method... magento 2

Fatal error: Class Zend\Stdlib\Parameters contains 1 abstract method and must therefore be declared abstract or implement the remaining met...