简体   繁体   中英

Magento : Fatal error: Call to a member function getMethodInstance() on a non-object

Login Admin > sales > orders and I click view some order show detail but some order show error

Fatal error: Call to a member function getMethodInstance() on a non-object in /home/easter13/public_html/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php on line 96

help me please, And thank you.

在此处输入图片说明

This is happning because there is a problem with your mail configuration. I have 2 suggestions:

1. Open app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php at line number 92 replace your code with below code:

if ($this->_isAllowedAction('emails') && !$order->isCanceled()) {
    $confirmationMessage = $coreHelper->jsQuoteEscape(
        Mage::helper('sales')->__('Are you sure you want to send order email to customer?')
    );
    $this->addButton('send_notification', array(
        'label'     => Mage::helper('sales')->__('Send Email'),
        'onclick'   => "confirmSetLocation('{$confirmationMessage}', '{$this->getEmailUrl()}')",
    ));
}

Then clear your cache, refresh the page and see if your error is gone.

2. Open app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php at line number 92, uncomment this code and then clear your cache, refresh the page and check whether your error is gone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM