Magento create custom order statuses

This post is just a reminder for myself. It’s taken from http://www.magentocommerce.com/boards/viewthread/9976/P30/ . The code below was tested and works just fine on magento 1.4.0.1

So to recapitulate, I did the following (citing the other guys, thanks to atlasit, ajayksh and rune00):

1) write a list of the additional statuses that you want

2) download and open the file Magento\app\code\core\Mage\Sales\etc\config.xml
(do not upload it again as soon as you’re done, you need to place it into a different folder, see below)

3) find this code:

and after that add your own new custom status

4) Now find this code, a few lines below:


  
    
    
      
    
  

and under or above this block create a new block with your own custom status:



  
    
    
      
    
  

  
    
    
      
    
  

repeat this (step 3 and 4) for each new custom status

5) So that you can change your status from the admin interface back and forth
from any current status, you need to edit again each of the status code block
as follows.

change this


    
    
      
    
  

to this


    
    
      
      
      
      
      
      
      
    
    
  

you need to do this with all of the existing statuses and the new custom statuses that you’ve just created

so that these new statuses do not only become available and visible to the admin, but also to the customer
on his “my account” page (order history, current status), you need to make the new statues visible (thanks to rune00)
with the tag , as described above.

6) After you saved your changes, upload the new config.xml file to
/app/code/local/Mage/Sales/etc/ (you will need to create that folder structure)

7)Create a file named Mage_Sales.xml with the following content (thanks to atlasit)


    
        
            true
            local
        
    

Upload it to /app/etc/modules/

that’s pretty much it.

If you got it running successfully as well, let us know so that it will help others as well.

4 thoughts on “Magento create custom order statuses”

  1. Hi,

    Nice reminder. I tried to use it for a Magento 1.4.1 but as soon as i add the module, the ‘Sales’ menu disappears from the back office and the ‘Setup’ menu gives me an emtpy page (magento decoration is here but no options to setup). I tried with the Magento\app\code\core\Mage\Sales\etc\config.xml whith no modifications, same result. I think something changed between 1.4.0 and 1.4.1 and it’s no longer possible to override the Sales module this way.

    Do you have any idea or suggestion about that ?

    Thanks for the reminder anyway.

  2. Hello! It would be great to see a list of extensions that does that job. It’s useful for those who are not good at coding (like me:)). I’m using order status by amasty

Leave a Reply

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