0

As you see attached image, I would like to remove or hide the "Complete" order status from the status filer drop down. Can someone please let me know how to do that. i am a newbie to magento and kindly show me the direction as which file need to be edited. thanks

Updated: Ajay, your solution worked:) thanks you so much. As you can see attachment below. i have hided all order status except the "processing" status. i would like to find out you can can show me how to remove or hide the "blank" selection of order status. see attached image below.(i basically only want to see the "processing" status under the status filter)

status2

1

You need to override the following config.php file and add the one line code just.

/app/code/core/Mage/Sales/Model/Order/config.php

Mage_Sales_Model_Order_Config


public function getStatuses()
{
    $statuses = Mage::getResourceModel('sales/order_status_collection')
        ->toOptionHash();
        unset($statuses['complete']); // add this line in your code
    return $statuses;
}

Go with the following path and add jQuery at the script section:

/app/design/adminhtml/default/default/template/page

jQuery( document ).ready(function() {
    jQuery('select option').filter(function() {
           return !this.value && jQuery.trim(this.value).length == 0 && jQuery.trim(this.text).length == 0;
    }).remove();
});

Note This script remove blank option from all your admin panel drop down.

Happy Coding :)

| improve this answer | |
  • Hi Ajay, thanks for answering my question. after i open the Grid.php under file path /app/code/core/Mage/Adminhtml/Block/Sales/Order, i can not find those code that you mention to comment out. Can you confirm the file path is correct or maybe i am doing something wrong. – kang Apr 1 '16 at 1:11
  • I think you have used any module for this?? please check in code/local/ or code/community/ folder – Ajay Patel Apr 1 '16 at 3:38
  • Hi Ajay, i did not actually use any extension for this. any idea where i can try to find the code that you mentioned? – kang Apr 3 '16 at 23:53
  • hi @kang sorry for late, please refer updated answer. its working. – Ajay Patel Apr 4 '16 at 3:46
  • Hi, Ajay, your solution worked:) thanks you so much. As you can see my updated attachment above. i have hided all order status except the "processing" status. i would like to find out you can show me how to remove or hide the "blank" selection of order status. see attached image above as well.(i basically only want to see the "processing" status under the status filter) – kang Apr 6 '16 at 2:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.