I added new order status by System -> Order Statuses

My doubt is need to add that status name in app/code/core/Mage/Sales/Model/Order.php this file.?

Currently that file has this code

    const STATE_NEW             = 'new';
    const STATE_PENDING_PAYMENT = 'pending_payment';
    const STATE_PROCESSING      = 'processing';
    const STATE_COMPLETE        = 'complete';
    const STATE_CLOSED          = 'closed';
    const STATE_CANCELED        = 'canceled';
    const STATE_HOLDED          = 'holded';

Need to add my status name here.?

If yes,how to do that without write core file.?

Anyone can tell?

1 Answer 1


These are states not the status. If you want to assign any state to your status you can do that from System -> Order Statuses. No need to change in app/code/core/Mage/Sales/Model/Order.php. for more information read

  • If I write my status in that file. I can use like this $order->setState(Mage_Sales_Model_Order::STATE_DELIVERED, true) . Is it correct? Mar 7, 2018 at 7:41
  • @NagarajJuro STATE is something else. if you want to add status just follow my solution magento.stackexchange.com/questions/203288/… Mar 7, 2018 at 7:43
  • Now i understood. Thank you @Qaisar Satti. Mar 7, 2018 at 7:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.