[英]Magento Fatal Error - Call to a member function getId() on a non-object
When connecting Magento to Zapier the response is an error code: 将Magento连接到Zapier时,响应为错误代码:
authorization failed: junk after document element: line 2, column 0
Further searching shows the cause is an IWD Sales Rep Extension in Magento. 进一步的搜索显示原因是Magento中的IWD销售代表扩展。
Fatal error : Call to a member function getId() on a non-object in
/home/moove/public_html/app/code/community/IWD/SalesRepresentative/Model/Observer.php on line
452
致命错误 :在第
452行上的
/home/moove/public_html/app/code/community/IWD/SalesRepresentative/Model/Observer.php中的非对象上调用成员函数getId()
Below is line 449 - 459 下面是第449-459行
}
public function getUserSettings(){
$userId = Mage::getModel('admin/session')->getUser()->getId();
$item = Mage::getModel('salesrep/users')->load($userId,'user_id');
if ($item->getId()){
return $item;
}
return false;
}
Appreciate anyone's help resolving this issue. 感谢任何人的帮助来解决此问题。
Try 尝试
$userId =Mage::getSingleton('admin/session')->getUser()->getId(); $ userId = Mage :: getSingleton('admin / session')-> getUser()-> getId();
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.