Mini Cart initialization
-
Hello!
I am using the standard WooCommerce Mini-Cart in combination with the YITH Ajax Product Filter.
I just became aware, that the WooCommerce Mini-Cart stops working after the YITH Filter is used and the filtered products are loaded via Ajax.
The Amount doesn’t gets refreshed anymore and the sidebar doesn’t open when you click on the mini-cart icon.
I am also in contact with the YITH Developers, since I am pretty sure that this is a problem that has to be addressed by them.
Just wanted to ask if there is a way to re-initialize the mini-cart with JS in the meantime ?
I have this workaround that gets things working again after filtering:
$(document).on('yith-wcan-ajax-filtered', function(){ $(document.body).trigger('wc_fragment_refresh'); location.reload(); });
But this is a rather stupid solution, since the page is loaded twice.
Is there something else I can call instead of the location.reload() to get the mini-cart re-initialized?
Thank you for your help!
Best regards,
David
- The topic ‘Mini Cart initialization’ is closed to new replies.