[英]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
致命错误:在第 96 行的 /home/easter13/public_html/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php 中的非对象上调用成员函数 getMethodInstance()
help me please, And thank you.请帮助我,谢谢。
This is happning because there is a problem with your mail configuration.这是因为您的邮件配置存在问题。 I have 2 suggestions:
我有2个建议:
1. Open app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php
at line number 92 replace your code with below code: 1. 在第 92 行打开
app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php
将您的代码替换为以下代码:
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. 2.打开
app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php
92行,取消注释,然后清除缓存,刷新页面,检查错误是否消失。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.