簡體   English   中英

Magento:致命錯誤:在非對象上調用成員函數 getMethodInstance()

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

登錄管理 > 銷售 > 訂單,然后單擊查看某些訂單顯示詳細信息但某些訂單顯示錯誤

致命錯誤:在第 96 行的 /home/easter13/public_html/app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php 中的非對象上調用成員函數 getMethodInstance()

請幫助我,謝謝。

在此處輸入圖片說明

這是因為您的郵件配置存在問題。 我有2個建議:

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

然后清除緩存,刷新頁面並查看錯誤是否消失。

2.打開app/code/core/Mage/Adminhtml/Block/Sales/Order/View.php 92行,取消注釋,然后清除緩存,刷新頁面,檢查錯誤是否消失。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM