简体   繁体   English

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

[英]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.

相关问题 Magento:致命错误:在非对象上调用成员函数 getMethodInstance() - Magento : Fatal error: Call to a member function getMethodInstance() on a non-object Magento致命错误:在非对象上调用成员函数save() - Magento Fatal error: Call to a member function save() on a non-object 致命错误:在Magento中的非对象上调用成员函数getIdFieldName() - Fatal error: Call to a member function getIdFieldName() on a non-object in Magento 致命错误:在 magento 中的非对象上调用成员函数 getLevel() - Fatal error: Call to a member function getLevel() on a non-object in magento Magento:致命错误:在非对象上调用成员函数getItems() - Magento: Fatal error: Call to a member function getItems() on a non-object Magento:致命错误:在非对象上调用成员函数 load() - Magento: Fatal error: Call to a member function load() on a non-object 致命错误:在magento中的非对象上调用成员函数getEmail() - Fatal error: Call to a member function getEmail() on a non-object in magento Magento致命错误:在非对象上调用成员函数addFieldToFilter() - Magento Fatal error: Call to a member function addFieldToFilter() on a non-object Magento致命错误:在非对象上调用成员函数getSku() - Magento Fatal Error: Call to member function getSku() on a non-object Magento 1.7.0.2-在view.phtml中的非对象上调用成员函数getId()(PHP错误) - Magento 1.7.0.2 - Call to member function getId() on a non-object in view.phtml (PHP Error)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM