Added to cart notifications not showing

Issue: When implementing the “Add to Cart form”, clicking the “add to cart” button does not present the “<PRODUCT NAME> has been added to your cart” message. Instead, it shows those on the cart page, when loaded.

Troubleshooting completed: I’ve disabled the “Enable AJAX add to cart buttons on archives” option which was recommended in this thread but that has made no change in behavior.

Please help

Hello @readycog,

Thanks for writing in!

Please be advised that the Add to Cart Form element is best used in WC Single layouts only. The Add to cart behavior only applies with the following condition:

  • On single product page, it will redirect to cart page after you have click the add to cart button.
  • On archive pages, it will automatically add the product to cart once you click the add to cart button.

The setting will not be applied if you are using the “Add to Cart Form” element on the archive pages.

Kindly let us know how it goes.

The add to cart form is being used in a WC Single layout

With the standard WooCommerce pages, clicking “Add to cart” will display the messages without necessitating the redirect to the cart page. If I understand correctly, this is not possible when using the layout editor, correct?

Hello @readycog,

In your WC Single, you can add the Shop Notices element.

When you click the Add to Cart, the page will refresh and the notices will display.

Hope this helps.

That was the trick. This could really benefit by being documented.

Hi @readycog,

Glad that we are able to help you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.