I am working with Magento 1.9.2 and i am working on a custom extension.
I have created a copy from
/app/code/core/Mage/Adminhtml/Block/Sales/Order/Grid.php
Copy to :
/app/code/local/Mage/Adminhtml/Block/Sales/Order/Grid.php
And then in the second one i was modifiyng this function:
protected function _prepareCollection()
{
$collection = Mage::getResourceModel($this->_getCollectionClass());
$this->setCollection($collection);
return parent::_prepareCollection();
}
To this:
protected function _prepareCollection()
{
$collection = Mage::getModel('sales/order')->getCollection()->addFieldToFilter('status',array('neq' => 'epaycc'));;
$this->setCollection($collection);
return parent::_prepareCollection();
}
And now i have other problem.
It seems it is not showing orders with status epaycc
as i wanted but now it is not showing the names for the customers who created the order. Take a look:
I think the problem occur because i have not set the filter right. Where is my mistake, how can i fix it and achieve what i want ?
Thanks in advance!