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.

close