I have an interesting issue with a WooCommerce instal which is actually two issues around the same thing (I think).

Issue 1

The first is to do with the AJAX fired when you click add to basket on archive pages. This works perfectly in the shop but I also have products on the homepage and it doesn’t fire the AJAX there. Which means if you add a product to the basket on the homepage there is no indication anything happened.

I can see a tickbox in the admin labelled “Enable AJAX add to basket buttons on archives” Which makes me think there is no setting for AJAX on products on the homepage. Is there a way I can add that without overwriting core files?

Issue 2

I display the number of items in the basket in the header of the website. When you click add to basket, the product does get added but this number does not update until the page has been refreshed. I’m assuming this is also to do with the AJAX?

Neither issue shows any errors in console log which makes me think that for whatever reason there is no javascript there to run on these events.

Does anyone have any idea how I can fix these? The website in question is: http://telford-webdesign.co.uk/

Thank you in advance :)

Read more here: WooCommerce AJAX on add to basket not always working


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , , ,

Wordpress related questions and answers: