m4rlb0r0 Posted August 11, 2021 Share Posted August 11, 2021 Is it really necessary to download the entire product from api to update the price? I can send back such xml: <prestashop xmlns:xlink="http://www.w3.org/1999/xlink"> <product> <id><![CDATA[]]></id> <price><![CDATA[]]></price> <wholesale_price><![CDATA[]]></wholesale_price> </product> </prestashop> Unfortunately, not completed fields clear entries in the database. Is it possible to add a flag to the xml parsing function so that it does not update the absent fields? Thanks in advance for your help Link to comment Share on other sites More sharing options...
m4rlb0r0 Posted August 18, 2021 Author Share Posted August 18, 2021 Any ideas ? Link to comment Share on other sites More sharing options...
vad1 Posted August 18, 2021 Share Posted August 18, 2021 As it says in devdocs class validation for fields is the same for POST (create) and PUT (update) but it will be fixed in future introducing PATCH method. https://devdocs.prestashop.com/1.7/webservice/getting-started/#control-returned-fields-with-display As bypass you can develop your own module using addWebserviceResources hook to handle request with custom XML (like you mentioned before). 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