I searched all around to find this solution. In Magento Commerce, there is no provision for manually changing order status from the admin panel. I have also try to change in Magento\app\code\core\Mage\Sales\etc\config.xml file but i cant change in magento1.6. so finally i got below solution i hope this work for you.
Open file app\design\adminhtml\default\default\template\sales\order\view\history.phtml in this file.
Also replace the code.
<?php foreach ($this->getStatuses() as $_code=>$_label): ?> <?php endforeach; ?>
with
<?php $selected = ""; foreach (Mage::getSingleton('sales/order_config')->getStatuses() as $_code=>$_label): if($_code==$this->getOrder()->getStatus()) $selected = 'selected="selected"'; echo ""; endforeach;?>
Its works perfectly for me i hope its work for you.
how would u do this by not overriding the core files and creating it as its own module?
ReplyDeleteI have use it using overriding the code files of magento.
Deleteworks a treat! awesome stuff, maybe instead of reading the data from the array its read directly from the database instead, incase people put custom order statuses
ReplyDeleteThanks Jay for suggestion i will update you soon.
DeleteI have update it. you can see in above code all status are fetched dynamically.
DeleteHey Ram
DeleteAnd idea on how i can make it update the state value as well?
problem is if one item goes to state value fraud, updating the status doesnt make it avaiilable to invoice and go ahead with the order
HI ram, awesome stuff mate. im trying to sort it out though so the "state" updates according to the status value too.
ReplyDeleteI hope that makes sense?
Is a same thing for magento 1.7 ?
ReplyDeleteI try replace the code in magento 1.7, but not realy works.
You can help-me, please....
This comment has been removed by the author.
ReplyDeleteIn Magento 1.7, replace:
ReplyDeleteforeach ($this->getStatuses() as $_code=>$_label):
With:
foreach (Mage::getSingleton('sales/order_config')->getStatuses() as $_code=>$_label):
...and it will work.
Just replace the code above, don't worry with replacing the entire foreach block because it won't work, just follow above.
Deletethanks
Deletevery uses full script
Dear Friends,
ReplyDeleteIt is not working after changing the code
when we click to check the order detail it dose not show any thing other then a screen of written information nothing else.
I am using 1.7.0.2 magento.
Need help.
thanks, works perfectly. Only 1 exception. I had to change line 6 to
ReplyDeleteecho '< option value="'.$_code.'" '.$selected.'="">'.$_label.'< /option>';
(had to add blanks before "option" and "/option" to avoid your html-commentvalidation)