magentomagento-1.5

Create custom order statuses in magento 1.5


I'm trying to add a custom order status to my magento install. I've found several tutorials detailing how to do this and they all speak of editing app/code/core/Mage/Sales/etc/config.xml

But, when I look at that file, it contains the statement: @depraceted after 1.4.2, statuses are saved into sales_order_status table

I'm unsure how to add a new status to the DB.

It looks as if all I need to do is insert a new row into sales_order_status with my status's code and frontend label, then associate that status to a state by adding a row to sales_order_status_state with the status's code and the code of all the states I wan't the status to be available for.

But I'm a little hazy on the state/status relationship, and I've been burned in the past by using raw SQL with a magento installation. So, I'm wondering if anyone else has added custom status in 1.5, and how they did it.


Solution

  • Since Magento 1.5 custom order statuses can be configured via the backend. Navigate to System -> Order Statuses and you can create and edit order statuses and codes.