big_73 Posted April 4, 2017 Share Posted April 4, 2017 (edited) hi guys, i'm new, and i've a problem with webservice. when i try to retrieve customers filtering by date_add i get this error: <message><![CDATA[This filter does not exist. Did you mean: "deleted"? The full list is: "id", "id_default_group", "id_lang", "newsletter_date_add", "ip_registration_newsletter", "last_passwd_gen", "secure_key", "deleted", "passwd", "lastname", "firstname", "email", "id_gender", "birthday", "newsletter", "optin", "website", "company", "siret", "ape", "outstanding_allow_amount", "show_public_prices", "id_risk", "max_payment_days", "active", "note", "is_guest", "id_shop", "id_shop_group"]]></message> this is my code: $yesterday = date("Y-m-d H:i:s", time() - 60 * 60 * 24); $webService = new PrestaShopWebservice(PS_SHOP_PATH, PS_WS_AUTH_KEY, DEBUG); // Qui imposto le opzion dell'array per il Webservice: in questo caso i clienti e setto che il formato è json $opt = array( 'resource' => 'customers', 'filter[date_add]' => '['.$yesterday.']&date=1', 'display' => 'full', 'output_format' => 'JSON' ); // faccio la chiamata $xml = $webService->get($opt); I'm stuck, I do not know what to do !!! any help is appreciated Edited April 4, 2017 by big_73 (see edit history) Link to comment Share on other sites More sharing options...
big_73 Posted April 4, 2017 Author Share Posted April 4, 2017 I also modified the customer class like so: protected $webserviceParameters = array( 'fields' => array( 'id_default_group' => array('xlink_resource' => 'groups'), 'id_lang' => array('xlink_resource' => 'languages'), 'newsletter_date_add' => array(), 'date_add' => array(), 'date_upd' => array(), 'ip_registration_newsletter' => array(), 'last_passwd_gen' => array('setter' => null), 'secure_key' => array('setter' => null), 'deleted' => array(), 'passwd' => array('setter' => 'setWsPasswd'), ), 'associations' => array( 'groups' => array('resource' => 'group'), ) ); resultless Link to comment Share on other sites More sharing options...
big_73 Posted April 5, 2017 Author Share Posted April 5, 2017 solved by rewriting the file PSWebServiceLibrary.php 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