syammohanmp / CartMart

Cart Mart will convert your Magento Store to Multivendor Marketplace, which will have a separate vendor / seller section for their Products.
Open Software License 3.0
39 stars 44 forks source link

SOAP API call crashes at Openwriter_Cartmart_Model_Product_Observer #32

Closed yashgoyani closed 9 years ago

yashgoyani commented 9 years ago

Calling any Catalog related API (eg. catalogProductList) with correct role, user, API Key causes the API to return an error -

PHP Fatal error: Uncaught SoapFault exception: [SOAP-ENV:Server] Call to a member function getRole() on a non-object

On tracking this error, it seems that this error is due to Line 31 - if ($current_user->getRole()->getRoleId() == $roleId) { of Openwriter_Cartmart_Model_Product_Observer class. The Line 29 - $current_user = Mage::getSingleton('admin/session')->getUser(); returns null as $current_user.