Mark Morton Posted May 26, 2016 Share Posted May 26, 2016 (edited) I've tried everything, can anyone help me? $xml = $webService->get(array('url' => 'http://MYURL/api/taxes?schema=blank')); $resources = $xml->children()->children(); $resources->rate = 9.99;$resources->name = 'test'; try{ $opt = array('resource' => 'taxes'); echo $opt['postXml'] = $xml->asXML(); $xml = $webService->add($opt); } catch(PrestaShopWebserviceException $ex) { echo $ex->getMessage(); } Edited May 26, 2016 by Mark Morton (see edit history) Link to comment Share on other sites More sharing options...
Mark Morton Posted May 26, 2016 Author Share Posted May 26, 2016 This is the XML I'm passing ........ <?xml version="1.0" encoding="UTF-8"?> <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <tax> <rate>9.99</rate> <name>Test</name> </tax> </prestashop> Link to comment Share on other sites More sharing options...
roband Posted May 26, 2016 Share Posted May 26, 2016 Hmm, cannot see anything wrong with the XML on first glance. Try enabling prestashop debugging, the webservice becomes more verbose on errors than, might help. See https://www.prestashop.com/forums/topic/224525-how-to-turn-on-error-reporting-for-debug-information-blank-page-500-internal-server-error/ 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