In sales/orders is it possible to hide completed orders ? using something like filters.

or can I filter the status column with more than one status ?

  • which magento version? – Amit Bera Apr 27 '16 at 18:44
  • Are u want to show order grid with out complete order? – Amit Bera Apr 27 '16 at 18:50
  • magento – mubdea Apr 27 '16 at 19:04
  • yes I want to show order grid with out complete order. but only when I want to not permanently – mubdea Apr 27 '16 at 19:05

The observer way:


Then in your module/Model/Observer.php


class Vendor_Module_Model_Observer 
    public function filterGrid(Varien_Event_Observer $observer)
        $collection = $observer->getOrderGridCollection();
        $collection->addFieldToFilter('status',array('neq', 'complete'));

Magento sales order grid collection generate from Mage_Adminhtml_Block_Sales_Order_Grid at class _prepareCollection function.

you need to modify the collection from here.

So you need to override that class

class [ModuleNameSpace_ModuleName]_Block_Adminhtml_Sales_Order_Grid extends Mage_Adminhtml_Block_Sales_Order_Grid
  protected function _prepareCollection()
        $collection = Mage::getResourceModel($this->_getCollectionClass());
            // filter ty status 
        $collection ->addFieldToFilter('status',array('neq', 'complete'));
        return parent::_prepareCollection();

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.