When connecting Magento to Zapier the response is an error code:
authorization failed: junk after document element: line 2, column 0
Further searching shows the cause is an IWD Sales Rep Extension in Magento.
: Call to a member function getId() on a non-object in on line :在第行上的的非对象上调用成员函数getId()
Below is line 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();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.