Jump to content

Ajax Add to cart not working on product page


MarcelB

Recommended Posts

Hi,

Everything worked fine with my Prestashop 1.7.3.1 shop until a few days ago, when Prestashop announced that vulnerability related to the phpunit folder on some modules.

I found the phpunit folder in the /modules/ps_facetedsearch/vendor folder and deleted it as recommended by prestashop.

Then I did an update to the ps_facetedsearch module  but it fails to reindex and build attributes and featured indexes.

In addition, I noticed that if this module is activated, the ordering of products by price does not work anymore. As soon as I turn it off, the ordering works.

But now I noticed an even bigger problem: when I click on "add to cart" button in product page there is no action on the page. The cart icon in the header does not update to show the product added. If I refresh the page, products are in the cart.

“Add to cart” working on Quick view on product list page, but not  working on product page.

And when they are products in the cart, if I delete them using the header basket, it seems that they have not been deleted, but at refresh I see that they have been deleted.

Can someoane help me, please?

Link to comment
Share on other sites

Sounds like you have some JS errors on the product page.

Try to use the developer mode in your browser (in Chrome, right click the page and click "Inspect"), go to the console tab, and reload the product page.

Paste the error you see here (after doing a google search for it to see if it was posted before and has an answer).

Link to comment
Share on other sites

20 minutes ago, tomerg3 said:

Sounds like you have some JS errors on the product page.

Try to use the developer mode in your browser (in Chrome, right click the page and click "Inspect"), go to the console tab, and reload the product page.

Paste the error you see here (after doing a google search for it to see if it was posted before and has an answer).

Thank you for your prompt answer!

I checked in Chrome, in the Console tab, and there is no error.

I also checked in Network tab, XHR, and found the following parameters:

------------------------------------

{success: true, id_product: 2161, id_product_attribute: 0, quantity: 1, cart: {,…}, errors: ""}

success: true

id_product: 2161

id_product_attribute: 0

quantity: 1

cart: {,…}

errors: ""

------------------------------------
I tested for this page:
https://shop.casesigradini.ro/acasa/2161-pat-lemn-masiv-din-lemn-de-fag-natur-160x200.html

What else should I check? Thanks!

Link to comment
Share on other sites

  • 6 months later...
  • 9 months later...
On 1/17/2020 at 9:42 PM, MarcelB said:

Thank you for your prompt answer!

I checked in Chrome, in the Console tab, and there is no error.

I also checked in Network tab, XHR, and found the following parameters:

------------------------------------

{success: true, id_product: 2161, id_product_attribute: 0, quantity: 1, cart: {,…}, errors: ""}

success: true

id_product: 2161

id_product_attribute: 0

quantity: 1

cart: {,…}

errors: ""

------------------------------------
I tested for this page:
https://shop.casesigradini.ro/acasa/2161-pat-lemn-masiv-din-lemn-de-fag-natur-160x200.html

What else should I check? Thanks!

I have the same  problem, how  did  you  solve, please  can you  help me?

Link to comment
Share on other sites

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