gusman126 Posted July 11, 2020 Share Posted July 11, 2020 I need to add filters to webservice I need to make some modifications in the prestashop webservice When I read the products, I don't have the option to filter by update date and added date How can I add this filter? I have learned to add the field to show the date, the "controller" product must be changed, but I cannot find how to add a date_upd filter Link to comment Share on other sites More sharing options...
gusman126 Posted July 11, 2020 Author Share Posted July 11, 2020 (edited) Resolved : Need change lib file public function get($options){ .............. if (count($url_params) > 0) { $url .= '?' . http_build_query($url_params); } //add if($options['date'] == '1'){ $url .= '&date=1'; } } Create order webservice : $hoy = date('Y-m-d'); $opt = array( 'resource' => 'products', 'date' => '1', 'display' => 'full', 'filter[date_upd]' => '>['.$hoy.']', ); IMPORTANT! SIMBOL ">" FOR greater than date or "<" smaller than Dates = array Webservice full of bugs!!! Edited July 11, 2020 by gusman126 (see edit history) 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