Please can anyone help me with step to step on how to create an observer on this page: Hide completed orders from sales/orders I have created observer.xml in app/etc/modules/ with the code below:


and also observer.php is created in app/etc/modules/model with the code below:

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

but I couldn't get it to work Thank you.


For some reason it did not work. I did as you explained then created hide_complete.xml in the app/etc/modules

<?xml version="1.0"?>

Is there something that I am missing my folder path is: app/code/local/Hide/Complete Thank you

  • I have added the issue that I have with it. Thank you – Adeola Adeoti Aug 11 '17 at 0:13
  • Can you please post your complete code? – sv3n Aug 11 '17 at 0:15
  • Can you please addfull pathes to your files? Here was somthing like observer.xml??? – sv3n Aug 11 '17 at 0:25
  • Those are actually the paths I used, I am not sure if I am correct. Your help will highly be appreciated. – Adeola Adeoti Aug 11 '17 at 0:28
  • Let us continue this discussion in chat. – Adeola Adeoti Aug 11 '17 at 0:30

Your files are just in the wrong directories ... just create an extension and

  1. add your Your_Module.xml to app/etc/modules/
  2. your code from observer.xml belongs to app/code/POOL/Your/Module/etc/config.xml
  3. and Òbserver.php goes to app/code/POOL/Your/Module/Model/

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