AJAX add to cart not working with (official) Product Bundles plugin?

Hi,

we use Product Bundles plugin (https://woocommerce.com/products/product-bundles/) on our site https://www.noanoliveoil.com/shop/erstellen-sie-ihr-ganz-persoenliches-noan-geschenkset and i am 99% certain that it has worked fine before, the site, including betheme is online for years now.

This week i wanted to roll out product bundles to some other products and suddenly found out that it was not working anymore. After debugging around for hours it seems that the AJAX add to cart is the problem, if i disable it, the bundles work. It behaves funny: It seems to work, but the AJAX call returns an empty cart (i can see it in dev tools because it even returns the text "the cart is empty").

I tried reaching out to wooCommerce and they answered this:

We have seen several issues in the past on sites using AJAX Add to cart buttons on single product pages. By default, WooCommerce supports AJAX functionality for Add to Cart buttons in Shop Archives.

Making AJAX-enabled add-to-cart buttons work correctly in single-product pages requires a bit more work -- most themes that use AJAX Add to Cart buttons fail to post all form contents when these buttons are clicked.

The best way to proceed with this is to get in touch with your theme authors.

Their answer seems in line with what i found out, can you check this and hopefully help without me needing to just turn off the nice AJAX functionality?

Thanks :)

Gerald

Comments

  • Hello,

    Some WooCommerce plugins that add forms need a page to reload to post all information.

    Enabled AJAX worked only on product lists before but not on single products, and it is by default in WooCommerce. In the recent updates, we added it for the single products as well, but as I mentioned in the beginning, some plugins requires reloading to work correctly.

    If you leave a basic WooCommerce enabled on your website, and create a simple product, you will notice that the AJAX works correctly.


    Best regards

Sign In or Register to comment.
This website uses cookies

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners who may combine it with other information that you’ve provided to them or that they’ve collected from your use of their services.

Cookies are small text files that can be used by websites to make a user's experience more efficient.

The law states that we can store cookies on your device if they are strictly necessary for the operation of this site. For all other types of cookies we need your permission. This means that cookies which are categorized as necessary, are processed based on GDPR Art. 6 (1) (f). All other cookies, meaning those from the categories preferences and marketing, are processed based on GDPR Art. 6 (1) (a) GDPR.

This site uses different types of cookies. Some cookies are placed by third party services that appear on our pages.

You can at any time change or withdraw your consent from the Cookie Declaration on our website.

Learn more about who we are, how you can contact us and how we process personal data in our Privacy Policy.

Please state your consent ID and date when you contact us regarding your consent.