Programmatically create order statuses in Magento

If you want to create new order statuses (not states) and assign them to a particular state you need to use the sales/order_status model. It’s pretty easy:

$status = Mage::getModel('sales/order_status');

Then you can assign the state with the assignState method:


Leave a Reply

Your email address will not be published.