Jump to content

[SOLVED] Add to cart button not working


marketyellow3

Recommended Posts

Hello,

I am currently working on my new Prestashop site with the latest version 1.7.6.1 but now i discovered that the add to cart button doesn't work on the product page it self or the quick view page. In the debug modus it doesn't give a error, is there someone else who also encountered this problem?

Thank you for replying and have a great weekend!

Kind regards,

Peter

Edited by marketyellow3 (see edit history)
Link to comment
Share on other sites

Goodmorning,

This is the SyntaxError i get in the console:

SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data bottom-88588d81.js:411:108
    paginateComments http://autoonderdelenexpres.nl/themes/laber_complex_home5/assets/cache/bottom-88588d81.js:411
    u http://autoonderdelenexpres.nl/themes/laber_complex_home5/assets/cache/bottom-88588d81.js:39
    fireWith http://autoonderdelenexpres.nl/themes/laber_complex_home5/assets/cache/bottom-88588d81.js:39
    S http://autoonderdelenexpres.nl/themes/laber_complex_home5/assets/cache/bottom-88588d81.js:39
    t http://autoonderdelenexpres.nl/themes/laber_complex_home5/assets/cache/bottom-88588d81.js:39

 

Edited by marketyellow3 (see edit history)
Link to comment
Share on other sites

It clearly has a problem with JSON data sent by a module probably.

Disable the JS caching in backoffice so there may be a more explanatory JS file name.

Anyway, you'll have to dig into that JS file at that specific line and debug to find out which module has this issue.

Link to comment
Share on other sites

It was the product comment module from Prestashop so i disabled this module because i don't really need it, the error is now gone but the button still doesn't work. Already cleared the cache in the backoffice and the cache on my own pc. I also tried to disable ajax-shopping cart but still no result. Is it maybe smarter to reinstall Prestashop or do you think it is fixable?

Thank you for the help!

Link to comment
Share on other sites

Yes i tried on Chrome, Firefox and Microsoft edge also on my mobile phone to be sure.. and i don't have Cloudfare or similar cache things.

And also no JS erorrs in the console with even debug modus on. Could it be a theme issue? i am not using the default one of Prestashop

Link to comment
Share on other sites

3 minutes ago, marketyellow3 said:

Yes i tried on Chrome, Firefox and Microsoft edge also on my mobile phone to be sure.. and i don't have Cloudfare or similar cache things.

And also no JS erorrs in the console with even debug modus on. Could it be a theme issue? i am not using the default one of Prestashop

I tried to switch to the default theme and the button works there so i have to figure out now how to fix the add to cart button on the theme i am using.

Link to comment
Share on other sites

Well... For us the issue was this:


We had a chat-function on our page. It seems that the js on the chat-function was overriding the “add to cart”-button.


The “add to cart”-button was functioning on our front page. Then the chat was set in motion, and that seems to have deactivated the js on the “add to cart”-button further “down” on our page.


The solution for us was to remove the chat-function from the store


Ideally, I would like to have the chat there as well, but now we have the chat on our main page and a functioning web store as well.

 

So I guess the quick answer is to check if there are different plugins or modules that do not work well together…

Edited by namanjohnson101 (see edit history)
Link to comment
Share on other sites

  • 11 months later...

hello marketyellow3. did you fixed it by reupload the theme in prestashop?in newbie in prestashop. i have a BIG problem. in you select/ or click the product. no add to cart display. literally. NO ADD TO CART. please help. im so hopeless for these problem. i cant find any answer in google. i hope theirs and expert here who can help my problem.


check my site. http://www2.gotindahan.com


 

Link to comment
Share on other sites

  • 7 months later...
  • 2 years later...

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...