Home » Featured, Magento

Magento hack to manually change order status in Admin panel

24 June 2009 1,544 views 2 Comments

We want to change the status of an order without going thru the process of Shipping and Invoicing. There are instances that Magento will lock the status of an order to pending until the order finishes its shipment.

This hack will activate all the order status on all states. What I mean is the Status dropdown in the Comment History, by choosing the desired status and Submitting the Comment. We can change the status of the order to Complete or Closed or any available status for that matter.

All we have to do is edit the config.xml under the magento_folder\app\code\core\Mage\Sales\etc\.

Then find the <states>code block. That’ll look like:

<states>
<new translate="label">
<label>New</label>
<statuses>
<pending/>
</statuses>
</new>
<processing translate="label">
<label>Processing</label>
<statuses>
<processing/>
</statuses>
</processing>
<complete translate="label">
<label>Complete</label>
<statuses>
<complete/>
</statuses>
</complete>
<closed translate="label">
<label>Closed</label>
<statuses>
<closed/>
</statuses>
</closed>
<canceled translate="label">
<label>Canceled</label>
<statuses>
<canceled/>
</statuses>
</canceled>
<holded translate="label">
<label>On Hold</label>
<statuses>
<holded/>
</statuses>
</holded>
</states>

And change this with the code below:

<states>
<new translate="label">
<label>New</label>
<statuses>
<pending/>
<processing/>
<holded/>
<complete/>
<closed/>
<canceled/>
</statuses>
</new>
<pending translate="label">
<label>Pending</label>
<statuses>
<pending/>
<processing/>
<holded/>
<complete/>
<closed/>
<canceled/>
</statuses>
</pending>
<processing translate="label">
<label>Processing</label>
<statuses>
<pending/>
<processing/>
<holded/>
<complete/>
<closed/>
<canceled/>
</statuses>
</processing>
<complete translate="label">
<label>Complete</label>
<statuses>
<complete/>
<pending/>
<processing/>
<holded/>
<closed/>
<canceled/>
</statuses>
</complete>
<closed translate="label">
<label>Closed</label>
<statuses>
<pending/>
<processing/>
<holded/>
<complete/>
<closed/>
<canceled/>
</statuses>
</closed>
<canceled translate="label">
<label>Canceled</label>
<statuses>
<pending/>
<processing/>
<holded/>
<complete/>
<closed/>
<canceled/>
</statuses>
</canceled>
<holded translate="label">
<label>On Hold</label>
<statuses>
<pending/>
<processing/>
<holded/>
<complete/>
<closed/>
<canceled/>
</statuses>
</holded>
</states>

After that, It is important to refresh your cache.

this hack was taken from Magento Forum’s atlasit

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

2 Comments »

  • Nick Houldsworth said:

    hi there,

    thanks for this great hack. it works great from the back end, but unfortunately it means that the customer is unable to view their order history from their account the front end?

    any ideas why this might occur?

    thanks

  • phong said:

    Hi Nick

    After hours of much looking, at sql logs, etc, i found the answer to be stupidly simple:

    the config.xml lines that are provided above omit the key:

    so here’s an example of one of the options w/ the visible on front key:

    Canceled

    without that key, nothing will show up in the front end.

    chuck that bad boy on and it’ll magically appear!

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.