hmvr414 Posted January 1, 2016 Share Posted January 1, 2016 Hi, I followed the guide to setup prestashop webservices (http://doc.prestashop.com/display/PS16/Using+the+PrestaShop+Web+Service), i create a key with permission to read categories and products and i was able to get the list of items, api/categories but when try to get the details of a single item i get an error 500 api/categories/1 enabling the debug output i get the following error description Fatal error: Uncaught Error: Function name must be a string in /Applications/MAMP/htdocs/prestatest/classes/webservice/WebserviceOutputBuilder.php:542 Stack trace: #0 /Applications/MAMP/htdocs/prestatest/classes/webservice/WebserviceOutputBuilder.php(481): WebserviceOutputBuilderCore->renderField(Object(Product), Array, 'id_default_imag...', Array, 0) #1 /Applications/MAMP/htdocs/prestatest/classes/webservice/WebserviceOutputBuilder.php(385): WebserviceOutputBuilderCore->renderEntity(Object(Product), 0) #2 /Applications/MAMP/htdocs/prestatest/classes/webservice/WebserviceRequest.php(1694): WebserviceOutputBuilderCore->getContent(Array, NULL, 'full', 0, 2) #3 /Applications/MAMP/htdocs/prestatest/classes/webservice/WebserviceRequest.php(560): WebserviceRequestCore->returnOutput() #4 /Applications/MAMP/htdocs/prestatest/webservice/dispatcher.php(87): WebserviceRequestCore->fetch('SE389PMRE2E2ZIF...', 'GET', 'products/1', Array, false, NULL) #5 {main} thrown in /Applications/MAMP/htdocs/prestatest/classes/webservice/WebserviceOutputBuilder.php on line 542 Thanks for any comment. Link to comment Share on other sites More sharing options...
JRubio74 Posted February 3, 2016 Share Posted February 3, 2016 I have the same problem, did you find a solution? Link to comment Share on other sites More sharing options...
basnet Posted August 25, 2016 Share Posted August 25, 2016 Hi, I followed the guide to setup prestashop webservices (http://doc.prestashop.com/display/PS16/Using+the+PrestaShop+Web+Service), i create a key with permission to read categories and products and i was able to get the list of items, api/categoriesbut when try to get the details of a single item i get an error 500 api/categories/1enabling the debug output i get the following error description Fatal error: Uncaught Error: Function name must be a string in /Applications/MAMP/htdocs/prestatest/classes/webservice/WebserviceOutputBuilder.php:542 Stack trace: #0 /Applications/MAMP/htdocs/prestatest/classes/webservice/WebserviceOutputBuilder.php(481): WebserviceOutputBuilderCore->renderField(Object(Product), Array, 'id_default_imag...', Array, 0) #1 /Applications/MAMP/htdocs/prestatest/classes/webservice/WebserviceOutputBuilder.php(385): WebserviceOutputBuilderCore->renderEntity(Object(Product), 0) #2 /Applications/MAMP/htdocs/prestatest/classes/webservice/WebserviceRequest.php(1694): WebserviceOutputBuilderCore->getContent(Array, NULL, 'full', 0, 2) #3 /Applications/MAMP/htdocs/prestatest/classes/webservice/WebserviceRequest.php(560): WebserviceRequestCore->returnOutput() #4 /Applications/MAMP/htdocs/prestatest/webservice/dispatcher.php(87): WebserviceRequestCore->fetch('SE389PMRE2E2ZIF...', 'GET', 'products/1', Array, false, NULL) #5 {main} thrown in /Applications/MAMP/htdocs/prestatest/classes/webservice/WebserviceOutputBuilder.php on line 542Thanks for any comment. On line 542 mentioned above, try changing $field['value'] = $object->$field['getter'](); to: $field['value'] = $object->($field['getter'])(); Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now