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.

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.

  • 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 Nov 14 '13 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 Nov 14 '13 at 10:35
7

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>
4

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).

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.