Ecom.Agora Posted January 22, 2015 Share Posted January 22, 2015 Hi, we have noticed that the xml schema of orders in webservice api is canghed from 1.6.0.9 to 1.6.0.11. There's no evidence of this change in your changelog. We have out software that use api calls to retrieve information about orders, when we have updated our test version to 1.6.0.11, our software breaks. The reason, after some investigation is that the current_state of xml schema is now (1.6.0.11) not filterable (we got an error :"The current_state id a dinamic field and now is not filterable..". We now that the filed is dinamic, infact we filtered the orders by status, now this is not possible. There's a workaround? Can we hope a xml schema change with current_state filterable? Now, we have this stange configuration with production version 1.6.0.9 'bugged version', and a test server with 1.6.0.11 more secure and with more featured, but unusable in production environment. Can anyone help us? 1 Link to comment Share on other sites More sharing options...
augustas Posted January 26, 2015 Share Posted January 26, 2015 I am also running into similar API problems after the upgrade to 1.6.0.11 Any advice, or information would be highly appreciated. Thank you Link to comment Share on other sites More sharing options...
Luchtdichtshop Posted January 30, 2015 Share Posted January 30, 2015 (edited) I use the webservices for extracting data to send parcels with sendcloud.nl. Since the update to 1.6.0.11 no orders appear in sendcloud. They say its in prestashop itself. Could be same reason AS stated above. Would love to hear where to look for a solution! Thx Edited January 30, 2015 by Luchtdichtshop (see edit history) Link to comment Share on other sites More sharing options...
augustas Posted January 30, 2015 Share Posted January 30, 2015 There are 2 things I can share, which might help you to solve the problems. At least, they helped me: There is a bug in the Order Class which brakes the WebService, and it is documented here: PSCSX-4403 and PSCSX-4423 The fix is described here. Orders cannot be filtered using "current_state" filter anymore. (The system returns error that this filter is dynamic (?) and cannot be used) So, if you were using it in the calls to API, then you have to redo/reprogramm your codes. You can pull out all the orders and do status check of each of them one-by-one. I hope this helps. Link to comment Share on other sites More sharing options...
Luchtdichtshop Posted January 31, 2015 Share Posted January 31, 2015 Augustas thanks for the tips. I'm halfway to the solution. Changing order.php made it possible again to retrieve the orders in sendcloud. But it only reads order id, status, and date. Could be because of the filter problem. I've contacted back again with Sendcloud. As soon as it is resolved i'll let you know. Link to comment Share on other sites More sharing options...
Luchtdichtshop Posted January 31, 2015 Share Posted January 31, 2015 Weird, but after reinstalling the webservice api's it suddenly worked. For me: problem solved! Link to comment Share on other sites More sharing options...
augustas Posted January 31, 2015 Share Posted January 31, 2015 Hello Luchtdichtshop, How did you "reinstall" the webservice? Was it on the "Sendcloud", or did you Disabled-then-Enabled webservice inside your Prestashop's "Advanced Parameters"? Are you using "current_state" filters? Do they work after "reinstallation" of webservice? Thank you. Link to comment Share on other sites More sharing options...
Luchtdichtshop Posted January 31, 2015 Share Posted January 31, 2015 Actually I've installed a new webservice and deleted the old one. Sendcloud is a company that offers services on sending parcels (see www.sendcloud.nl (Dutch only)). They have made an prestashop module which retrieves address info for the labels on parcels. To be honest I have no idea how their module works and if they use "current_state" filters. I've mailed them this discussion and your links. So they can check their software. Other customers might have the same problem. I expect an answer from them not sooner as monday. But when i do, I'll share it. Link to comment Share on other sites More sharing options...
Ecom.Agora Posted February 4, 2015 Author Share Posted February 4, 2015 We have found a workaround. The order_state is filterable on order_history api. So we can get all orders id from order_history and then retrieve orders from order Api. Link to comment Share on other sites More sharing options...
augustas Posted February 4, 2015 Share Posted February 4, 2015 We have found a workaround. The order_state is filterable on order_history api. So we can get all orders id from order_history and then retrieve orders from order Api. Thank you! That's useful. Indeed filter /order_histories/?filter[id_order_state]=4 works. Link to comment Share on other sites More sharing options...
augustas Posted May 7, 2015 Share Posted May 7, 2015 Ecom.Agora - I was not using "order_state" till now, but after starting to analyse this filter, the problem is that it does not return all the orders with state=4 at the moment. It returns all history recordings when orders had state=4 in the past, but now they might have changed the status. Anyone got a solution for Prestashop 1.6.0.11 an later - how to filter orders only with specific STATE at the moment? Link to comment Share on other sites More sharing options...
augustas Posted May 7, 2015 Share Posted May 7, 2015 I decided to use the following API URL request: /api/orders?display=full&filter[date_add]=>[YYYY-MM-DD]&date=1 replace YYYY-MM-DD with a valid date. This returns detailed information about all the orders created from YYYY-MM-DD. In the details of each order I can see the "order_state", which helps to decide what to do with the order next in the API application. 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