wallink Posted March 21, 2011 Share Posted March 21, 2011 Hello.I wonder if there is any filter on the webservice?For example if I want all orders with a specific status or all orders created after a specific date.is this possible in some way? Link to comment Share on other sites More sharing options...
wallink Posted March 25, 2011 Author Share Posted March 25, 2011 As I didn't get any answer I tried to find the answer in the source code.I found that you have a few filtering options:display:www.yourshop.com/shop/api/orders?display=VALUEWhere VALUE can be changed to 'full' or '[current_status,id...]'display makes it possible to specify which fields should be included in the resultlimit: example limit=5 (gives 5 results), limit=5,15 (gives 10 results)sort:example: sort=id_ASC, sort=current_status_DESCfilter:I know it is there but haven't figured out what to give. does anybody know? Link to comment Share on other sites More sharing options...
Burhan BVK Posted March 25, 2011 Share Posted March 25, 2011 You can add a filter parameter. ?filter[filedname]=valueYou can add multiple filters this way. There are more options, check the function getSQLRetrieveFilter for more details. Link to comment Share on other sites More sharing options...
wallink Posted March 25, 2011 Author Share Posted March 25, 2011 Thanks.Another thing then. It workes with most fields but not 'current_state' for order which is the one I want to filter on.on the order I can see not_filterable="true", but why is current_state not filterable? Link to comment Share on other sites More sharing options...
Burhan BVK Posted March 25, 2011 Share Posted March 25, 2011 Current state is not stored within the orders table. The api gets the last order state associated with that order and shows that. That is why it can't be used to filter. You should use the "valid" field instead. Link to comment Share on other sites More sharing options...
wallink Posted March 25, 2011 Author Share Posted March 25, 2011 Thanks again. I almost have everything I'm looking for:)The last thing I'm missing is payment information for orders.What I need is the id that the different payment modules leaves that is connected to the order.Some I know puts it in the order message and I guess other also puts it in the payment_cc table, but none of these can be retreived using the api, or can it?Also, is tha payment id or transaction id ever placed in any other location? Link to comment Share on other sites More sharing options...
wallink Posted April 8, 2011 Author Share Posted April 8, 2011 Anybody who knows where payment modules stores the payment/transaction ids? Link to comment Share on other sites More sharing options...
fguespe Posted November 26, 2014 Share Posted November 26, 2014 Same here... Link to comment Share on other sites More sharing options...
Totti Posted May 11, 2015 Share Posted May 11, 2015 Hello,I just upgraded to the latest version prestashop, before doing a filter field current_status on the orders table, but now I read that it is no longer filterable, how do I fix? 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