2

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.

dotancohen
1,1306 silver badges21 bronze badges
asked Dec 19, 2016 at 10:33
8
  • have you done any customization for payments or add any custom extension for the payment or shipping methods? Commented Dec 19, 2016 at 10:37
  • @ Abdul thanks for reply, We have not done any customization or modifications related to payment gateway. Commented Dec 19, 2016 at 10:39
  • have you added any custom extention? Commented Dec 19, 2016 at 10:40
  • Yes we have added one extra column to sales order grid. Commented Dec 19, 2016 at 10:45
  • Pls comment your code and check again. I think working :) Commented Dec 19, 2016 at 10:48

1 Answer 1

2

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();
 }
answered Dec 19, 2016 at 11:10
1
  • @Abdul It will be greate if you can explain about the fix Commented Dec 19, 2016 at 11:36

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.