I want to filter the order grid in admin to see only the orders in status "processing" in the grid by default.
This grid is different from the others, I tried solutions from here but no success
In magento 1 I have done this with an observer on "controller_action_predispatch_adminhtml_sales_order_index"
Do you have any idea on how to do that ?
Thanks you
EDIT 1 : This is the code I used in Magento 1 to do this with the event:
<controller_action_predispatch_adminhtml_sales_order_index>
<observers>
<set_default_filter_sales_order>
<type>singleton</type>
<class>Gone_PreparedGridFilter_Model_Adminhtml_Sales_Order_Observer</class>
<method>setDefaultGridFilter</method>
</set_default_filter_sales_order>
</observers>
</controller_action_predispatch_adminhtml_sales_order_index>
And in my file :
public function setDefaultGridFilter(Varien_Event_Observer $observer)
{
$request = Mage::app()->getFrontController()->getRequest();
if (! $request->getParam('filter')) {
$filter = $this->_getDefaultEncodedFilterString(); //custom function
Mage::app()->getFrontController()
->getRequest()
->setParam('filter', $filter);
}
return $this;
}
My goal is to have the grid filtered by the status when you arrived on it but to be able to modify all filter including the status one.
Edit 2
Does anyone have a solution for this, I'm still looking for a solution. I don't want to use the grid view save tool.