Dares8 Posted April 18, 2017 Share Posted April 18, 2017 Hi, I am trying to synchronize stock of several webs using Webservice. I am using PUT with stocks_availables but it only works in Prestashop 1.6. If I try it with Prestashop 1.5.6.2 return the next error: object(PrestaShopWebserviceException)#717 (7){ [ "message":protected ] => string(102) "This call to PrestaShop Web Services failed and returned an HTTP status of 404. That means:Not Found." [ "string": "Exception":private ] => string(0) "" [ "code":protected ] => int(0) [ "file":protected ] => string(73) "/usr/home/myweb.com/web/modules/mymodule/PSWebServiceLibrary.php" [ "line":protected ] => int(84) [ "trace": "Exception":private ] => array(8) { [ 0 ] => array(6) { [ "file" ] => string(73) "/usr/home/myweb.com/web/modules/mymodule/PSWebServiceLibrary.php" [ "line" ] => int(327) [ "function" ] => string(15) "checkStatusCode" [ "class" ] => string(20) "PrestaShopWebservice" [ "type" ] => string(2) "->" [ "args" ] => array(1) { [ 0 ] => int(404) } } [ 1 ] => array(6) { [ "file" ] => string(82) "/usr/home/myweb.com/web/modules/mymodule/controllers/front/sync.php" [ "line" ] => int(107) [ "function" ] => string(4) "edit" [ "class" ] => string(20) "PrestaShopWebservice" [ "type" ] => string(2) "->" [ "args" ] => array(1) { [ 0 ] => array(3) { [ "resource" ] => string(16) "stock_availables" [ "putXml" ] => string(510) " 12063 1806 0 1 0 95 0 2 " [ "id" ] => string(5) "12063" } } } } [ "previous": "Exception":private ] => NULL } In the Prestashop 1.5 documentation (http://doc.prestashop.com/display/PS15/Web+service+reference#Webservicereference-AvailableHTTPmethods) appears some exceptions, among them is stock_available. Stock_available only allow GET, POST and HEAD, however in webservice window you can only select GET, PUT and HEAD. How could I do it? Thanks! 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