WooCommerce “Add to cart notices” don’t appear
-
EAA2C(Free): 2.3.0
WooCommerce: 5.2.1
Wordpress: 5.7.1
Woodmart (Theme): 5.3.6Hi EAA2C Team,
i’m facing the problem that WooCommerce notices are not shown after (EAA2C)”Add to cart” button was clicked. The “mini cart view” open properly, but when re-submitting the button related constraint notices (e.g. only one product allowed in the cart”) don’t appear.
After some debugging i’ve figured out that you display the notices before a target element with the class “.content-area”.
enhanced-ajax-add-to-cart-wc-public.js:337
AddToCartHandler.prototype.showNotices = function( element, target ) { $( '.woocommerce-error, .woocommerce-message' ).remove(); var domTarget = $( '.content-area' ); //console.log( target ); //console.log( "showing notices" ); domTarget.before( target ); this.scrollToNotices(); // this.unblockButtons(); }
I don’t know if this is theme related (Woodmart) but in my case there is no such element with this class. After adding an element with this class, the “notices” appear. I don’t think this is a best practices. I guess there was/is a different intention behind it. Whats you thoughts on this?
Thx for you support ??
Markus
- The topic ‘WooCommerce “Add to cart notices” don’t appear’ is closed to new replies.