How do I programmatically access all orders and all invoices from php in Magento?
<?php
require_once("app/Mage.php");
$app = Mage::app('');
$salesModel=Mage::getModel("sales/order");
$salesCollection = $salesModel->getCollection();
foreach($salesCollection as $order)
{
$orderId= $order->getIncrementId();
echo $orderId;
}
?>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With