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:
<events>
<sales_order_grid_collection_load_before>
<observers>
<vendor_module_salesgrid>
<model>module/observer</model>
<method>filterGrid</method>
</vendor_module_salesgrid>
</observers>
</sales_order_grid_collection_load_before>
</events>
and also observer.php is created in app/etc/modules/model
with the code below:
<?php
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.
Update:
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"?>
<config>
<modules>
<Hide_Complete>
<active>true</active>
<codePool>local</codePool>
</Hide_Complete>
</modules>
</config>
Is there something that I am missing my folder path is: app/code/local/Hide/Complete
Thank you