Hi,
I’m fighting with woocommerce to add a simple cart count to my menu (without using a menu widget).
I have looked a number of different resources on the web but I’m missing something
Does anyone have a simple method in bricks & a snippet plugin like WPcodebox to do this? Just want to have a cart icon with the cart count to its right, hide the text if zero is zero. Do some CSS styling on the number when visible.
Hey ! It looks like you succeed on creating your own Dynamic woo cart count.
Would you mind giving me some details on how you succeed on it.
I guess I have to save your code on WP Code Box then, how did you manage to call it on your design ?
Thanks for your help.
Probably way to late for help out ludo here, but this codes adds a shortcode to WP that you can add to the menu. This will just create a banner containing the count, any icon or styling has to be added separately.
However, if your goal is a cart icon with a count on, the better solution is the mini-cart element.
Mini cart works fine once you style it, but there is a ton of code there. Pretty heavy on page load, even with perfmatters, etc. I ended up removing the mini cart to improve load times.
If anyone’s interested, I created a custom mini-cart that includes the cart count. I did everything with dynamic data tags rather than shortcodes so that I can use the tag filters in the builder.