10

It's clear how to create a new order status. System > Order Statuses > Create New Status

But how do you create a new state?

"processing", "complete", "new" are examples of the default Magento order state codes.

3 Answers 3

6

Open file app/code/core/Mage/Sales/etc/config.xml and find node. Inside this node, add following.

<mystate translate="label">
    <label>My State</label>
    <statuses>
       <mystatus default="1"/>
    </statuses>
    <visible_on_front>1</visible_on_front>
</mystate>

Note : I don't recommend to edit core files. But what you can do is, set this in your own module which is depends on Mage_Sales module.

2
  • Thanks. That was what I was looking for. I would agree that it's not smart to edit core files as they'll be overwritten in next Magento upgrade. Assuming copying the file and folder structure into the local folder pool should suffice to do what we want here?
    – MagentoMac
    Commented Nov 14, 2013 at 10:22
  • 1
    Rather than that what you can do is if you are writing your own payment module you can set the state by using it's config.xml
    – Sukeshini
    Commented Nov 14, 2013 at 10:35
8

you can add state by simply add xml code in your module config.xml

<global>
    <sales>
      <order>
       <states>
        <order_recieved translate="label">
          <label>Order Recieved</label>
            <statuses>
                <order_recieved default="1"/>
            </statuses>
          <visible_on_front>1</visible_on_front>
        </order_recieved>
      </states>
   </order>
  </sales>
 </global>
1
  • default="1" Is this line is compulsory ? Commented May 5, 2020 at 7:44
3

Also, you can create the status via System > Order Statuses > Create New Status, and then assign the status to a state (System > Order Statuses > Assing Status to State).

3
  • This should be approved answer. Commented Mar 9, 2016 at 19:16
  • 10
    Why should it be, He wanted a new State not a new Status :\ Commented May 25, 2016 at 12:25
  • Idiot you rasclart read the rass question cuz
    – A. Lal
    Commented Aug 9, 2019 at 8:57

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.