I can use this to get orders with status: complete
, processing
, closed
.
$orders = Mage::getModel('sales/order')->getCollection()
->addFieldToFilter(
array('status'),
array(
array(
array('eq' => 'complete'),
array('eq' => 'processing'),
array('eq' => 'pending_payment'),
array('eq' => 'canceled'),
),
)
);
However it doesn't return orders that are pending payment or canceled. How do I get the orders that are pending payment or canceled as well?