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');
$status->setStatus('status_code');
$status->setLabel('status_label');

Then you can assign the state with the assignState method:

$status->assignState('processing');
$status->save();
Categories: Development

0 Comments

Leave a Reply

Avatar placeholder

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.