Magento:致命错误:在非对象上调用成员函数getMethodInstance()

时间:2017-01-24 03:13:10

标签: php magento zend-framework magento-1.7

登录管理员>销售>订单和我点击查看一些订单显示详细信息,但一些订单显示错误

  

致命错误:在a上调用成员函数getMethodInstance()   非对象   /home/easter13/public_html/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php   在第96行

请帮助我,谢谢你。

enter image description here

1 个答案:

答案 0 :(得分:-1)

这很开心,因为您的邮件配置存在问题。我有2条建议:

1。打开app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php 在第92行,用下面的代码替换你的代码:

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()}')",
    ));
}

然后清除缓存,刷新页面并查看错误是否消失。

2。打开app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php 在第92行,取消注释此代码,然后清除缓存, 刷新页面并检查您的错误是否消失。