I am getting the below error while opening/viewing admin -> sales -> order -> view.
Call to a member function getMethodInstance() on boolean in /var/www/magento/app/code/core/Mage/Payment/Model/Observer.php on line 46
This error is causing for orders, those are having the order total is Zero means No Payment Information Required.
We are using Magento ver. 1.13.1.0.
Any help would be appreciated.
-
have you done any customization for payments or add any custom extension for the payment or shipping methods?Abdul– Abdul2016年12月19日 10:37:45 +00:00Commented Dec 19, 2016 at 10:37
-
@ Abdul thanks for reply, We have not done any customization or modifications related to payment gateway.Krishna ijjada– Krishna ijjada2016年12月19日 10:39:51 +00:00Commented Dec 19, 2016 at 10:39
-
have you added any custom extention?Abdul– Abdul2016年12月19日 10:40:35 +00:00Commented Dec 19, 2016 at 10:40
-
Yes we have added one extra column to sales order grid.Krishna ijjada– Krishna ijjada2016年12月19日 10:45:48 +00:00Commented Dec 19, 2016 at 10:45
-
Pls comment your code and check again. I think working :)Abdul– Abdul2016年12月19日 10:48:44 +00:00Commented Dec 19, 2016 at 10:48
1 Answer 1
Replace your code
From
protected function _prepareCollection()
{
$collection = Mage::getResourceModel($this->_getCollectionClass());
$collection->getSelect()->join(array('billing'=>'sales_flat_order_address'),'main_table.entity_id=billing.parent_id and billing.address_type="billing"',array('*'));
$this->setCollection($collection);
return Mage_Adminhtml_Block_Widget_Grid::_prepareCollection();
}
To
protected function _prepareCollection()
{
$collection = Mage::getResourceModel($this->_getCollectionClass());
$collection->getSelect()->join('sales_flat_order_address', 'main_table.entity_id = sales_flat_order_address.parent_id' ,array('company'=> 'company'));
$collection->addFieldToFilter('sales_flat_order_address.address_type', array('eq' => 'billing'));
$this->setCollection($collection);
return parent::_prepareCollection();
}
-
@Abdul It will be greate if you can explain about the fixImranSheik– ImranSheik2016年12月19日 11:36:14 +00:00Commented Dec 19, 2016 at 11:36
Explore related questions
See similar questions with these tags.