Jump to content

add to cart button syntax error


enriquevi

Recommended Posts

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

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...