My name is Clayton McIlrath and I am an entrepreneur currently living in CO. I personally enjoy the process of learning, exploring, and doing all things creative as well as sharing my experiences with others. Being an entrepreneur and business owner, I hope that my experiences may help someone else start their own venture and find success and freedom as I have! Feel free to contact me anytime for questions or opportunities.

close
more

»

«


Magento Custom Status in Admin

I had to wrestle with a magento issue recently and thought it would be good the share my problem and solution with the rest of you. If you’re looking to set custom status in magento, create custom status in magento or control order status then this solution is probably for you.

custom order status in Magento

First we have to create a module. Create file: app/etc/modules/Mage_Sales.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Mage_Sales>
            <active>true</active>
            <codePool>local</codePool>
        </Mage_Sales>
    </modules>
</config>

Then copy this whole folder: app/code/core/Mage/Sales to app/code/local/Mage

What we’ve done is taken a core module and copied it into our local module. This lets us override any core functionality without have to worry about it breaking in future update (or undoing if you mess up).

Now we need to edit: app/code/core/Mage/Sales/etc/config.xml and look around line 544 and you’ll want to replace tags with:

<order>
    <statuses>
        <pending translate="label"><label>Pending</label></pending>
        <pending_paypal translate="label"><label>Pending PayPal</label></pending_paypal>
        <processing translate="label"><label>Processing</label></processing>
        <holded translate="label"><label>On Hold</label></holded>
        <complete translate="label"><label>Complete</label></complete>
        <closed translate="label"><label>Closed</label></closed>
        <canceled translate="label"><label>Canceled</label></canceled>
    </statuses>
	<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>
</order>

order status
This will enable all default magento statuses on the order page. In edition to enabling statuses you can also create your own custom order status here as well. As far as I know this solution works on Magento 1.1 up to 1.3 but if you have any comments or questions feel free to post them here or read the forum on Magento’s site for more details.

View Comments to “Magento Custom Status in Admin”

  1. Winoto says:

    How to make default status for certain our own module? for example I create new payment module called Mybank Payment and I want to set default pending payment as pending_mybank or status is Pending Mybank not as pending_paypal (Pending Paypal). how can I implement it?

    Thank you

  2. bryan says:

    Could you edit Mage_All.xml and change core to local vs. creating Mage_Sales.xml?

Leave a Reply

You must be logged in to post a comment.

blog comments powered by Disqus
close