I'm on a mission to list all pending/processing and completed order lists on my external application from a Magento 1 site.
I learnt by using following code I can get all orders from the site. But how do i get order listing based on order status?
require_once 'app/Mage.php'; Mage::app(); $orders = Mage::getResourceModel('sales/order_collection'); foreach ($orders as $order): echo $order->getRealOrderId().' - '.$order->getCreatedAtStoreDate().' - ('.$order->formatPrice($order->getGrandTotal()).')<br>'; endforeach;