Roger007 Posted July 5, 2019 Share Posted July 5, 2019 Hi everybody, I start with prestashop 1.7 and try to do a WS API for sync my mongoDB with prestaDB. I found in documentation 2 way to do this with new hook AddWebserviceResources : with class or with specific_management. With class, i extend objectmodel for bind my table, in $webserviceParameter in push objectMethods with [update=>'updateWs'] but i doesn't know how manage the output. My function updateWs can return true, but i want return my own response with JSON With implementing WebserviceSpecificManagementInterface i cannot retrieve body parameter (inputXML of wsobject is protected) but i can modify this->output and do $this->objOutput->getObjectRender()->overrideContent($this->output) Can anyone write some little snippet for the right use of this technologies ? BTW : if only class version working it's fine, if i can override the reponse. Thanks a lot Link to comment Share on other sites More sharing options...
Presta Web Developer Posted March 29, 2022 Share Posted March 29, 2022 Did you solve the problem? I have the same problem, can't change the output using ObjectMethods. And can't get the inputXML body using WebserviceSpecificManagementInterface, because inputXML is protected. Anyone know a solution? 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