hardyahir Posted April 15, 2017 Share Posted April 15, 2017 (edited) i read the official documentation parts this http://doc.prestashop.com/display/PS14/Chapter+8+-+Advanced+Use and trying to get the employees using filter here is my code $opt = array( 'resource' =>'employees', 'display' =>'[full]', 'filter' =>['[email protected]'], 'filter[password]' =>['xxxxxxxxxxxxxxxx'] ); $data = $webService->get($opt); it generate url like thismyhop_url/api/employees?filter%5Bemail%5D=demo%40demo.com&filter%5Bpassword%5D=xxxxxxxxxxxxxxxx&display=%5Bfull%5D but it should be like this as shown in official documents myhop_url/api/employees?filter=['[email protected]]&filter['password']=['xxxxxxxxxxxxxxxx']&display=['full'] what is the problem i didn't get it? please help me to solve this bug. Thanks i advance. Update :-got a way to solve this decoding issue here is my code $url = $this->url.'/api/'.$options['resource']; $url_params = array(); if (isset($options['id'])) { $url .= '/'.$options['id']; } $params = array('display', 'filter', 'sort', 'limit', 'id_shop', 'id_group_shop'); foreach ($params as $p) { foreach ($options as $k => $o) { if (strpos($k, $p) !== false) { $url_params[$k] = $options[$k]; } } } if (count($url_params) > 0) $url .= '/?'.utf8_decode(urldecode(http_build_query($url_params) ) ); but still no data found when the url is called. Edited April 15, 2017 by hardyahir (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