![](/img/trans.png)
[英]Magento Fatal Error - Call to a member function getId() on a non-object
[英]Magento : Fatal error: Call to a member function getMethodInstance() on a non-object
這是因為您的郵件配置存在問題。 我有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.