rhythm Posted October 17, 2019 Share Posted October 17, 2019 (edited) Hey, I am sending data to custom PHP file on Prestashop in JSON format, with the header Content-Type: application/json. I tried Tools::getValue and _POST("MyVariable"), var_dump(_POST) shows nothing. If I select to send it as a form data, everything appears. However, that's not the choice I have. I need to POST JSON data to PRESTASHOP and use it on my custom controller. Edited October 17, 2019 by rhythm (see edit history) Link to comment Share on other sites More sharing options...
abdess Posted February 15, 2020 Share Posted February 15, 2020 I think u need add a header to your request: headers: {'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'} 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