enriquevi Posted June 14, 2016 Share Posted June 14, 2016 When I click the "add to cart button" I get the following error: Impossible to add the product to the cart. textStatus: 'parsererror' errorThrown: 'SyntaxError: JSON.parse: expected property name or '}' at line 2 column 1 of the JSON data' responseText: { 'products':[ { ...etc. Any idea? Link to comment Share on other sites More sharing options...
Rolige Posted June 15, 2016 Share Posted June 15, 2016 If you are using a custom theme, please activate temporally the default theme, clear all the cache and check if problem gone. Link to comment Share on other sites More sharing options...
Daniel Patilea Posted June 15, 2016 Share Posted June 15, 2016 When I click the "add to cart button" I get the following error: Impossible to add the product to the cart. textStatus: 'parsererror' errorThrown: 'SyntaxError: JSON.parse: expected property name or '}' at line 2 column 1 of the JSON data' responseText: { 'products':[ { ...etc. Any idea? Did you turned _PS_MODE_DEV_ on? Have you checked the error_log file? Link to comment Share on other sites More sharing options...
Rolige Posted June 15, 2016 Share Posted June 15, 2016 Did you turned _PS_MODE_DEV_ on? Have you checked the error_log file? Their error looks more like a JavaSrcipt error Link to comment Share on other sites More sharing options...
enriquevi Posted June 16, 2016 Author Share Posted June 16, 2016 In config/defines.inc.php I have the following: define (‘_PS_MODE_DEV_’, false); Should I change it to true? Link to comment Share on other sites More sharing options...
Rolige Posted June 16, 2016 Share Posted June 16, 2016 In config/defines.inc.php I have the following: define (‘_PS_MODE_DEV_’, false); Should I change it to true? If you want to show possible errors of php, yes you need do it. Link to comment Share on other sites More sharing options...
enriquevi Posted June 17, 2016 Author Share Posted June 17, 2016 If you want to show possible errors of php, yes you need do it. I changed it but I can't see any difference Link to comment Share on other sites More sharing options...
Rolige Posted June 18, 2016 Share Posted June 18, 2016 I changed it but I can't see any difference If the error is generated in a php file and you are calling this through ajax, you will not see nothing strange in the page. Could you share the URL to your site and leave debug mode enabled? 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