I'm trying to perform some operations on an order if its status/state is "processing" (not sure if I should use status
or state
here .. any help on this would be great too).
Running a ->getStatus()
on a sales/order
model tells me the value I'm looking for is "processing", but I don't want to compare this to a string literal. I would like to compare it to the Magento defined value, so I'm wondering how it determines this value "processing" and how can I do the same?
Here is some code..
$order = Mage::getModel('sales/order')->loadByIncrementId($orderID);
if($order->getStatus() == "processing") {
//do stuff
}
I would like to change "processing"
to something like Mage::getModel('sales/order')->STATUS_PROCESSING
I'm sure the answer lies somewhere in the Mage_Sales_Model_Order::getStatus()
method, but I'm having a very hard time locating that method. I've even used ReflectionClass
to view the methods and do not see it!