Ok so I've made a quick module. All seems to be working fine, corn job is running, admin section working and logging is working fine. However the order status I've defined in my XML is not appearing in the back end.


                <pending_canceled translate="label">
                    <label>Timed Out</label>

I've been googeling around for a few hours now and have found very sparse resources on this. Some mention adding a dependency to Mage_Sales and some mention having to now run this through PHP, but the only example of this I was able to find was a french article

Does anyone have an example of doing this in 1.9 (or 1.7 above I suppose). I get the feeling I'll need to run a script on install but I'm not sure how these install scripts run (if they're run once and its added, or if it needs to run constantly, or remove on uninstall...)

2 Answers 2


If you look at the config.xml of Mage_Sales module, you'll see

 * @depraceted after 1.4.2, statuses are saved into sales_order_status table

Order statuses and states are saved in the database. There should be plenty of references on how to add them manually or programmatically. Here is one http://www.techytalk.info/programmatically-add-new-order-state-and-status-in-magento/

How to create installation scripts is another question for which resources are already available as well.

  • This answer should be the accepted one. Dec 29, 2015 at 9:04

Make sure you assign your new "order status" to a "order state". (within your Magento Admin)

  1. Make new order status here - System -> Order Statuses.
  2. Then click "Assign Status to state" button on the same page.
  3. Now match the new status to a state.
  • The OP is clearly wanting to add the new order status programatically.
    – Dom
    Jul 25, 2017 at 11:15

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.