I am working on an e-commerce site, and I am using the ‘cart dropdown’ element in the header builder to allow customers to access their cart from anywhere on the site. I want the icon/element to have some type of indication that there are items in the shopping cart, I don’t want a number/dollar total like the X theme has in the menu cart, but maybe just a number next to the cart or even simply a different color, like an empty cart is grey but a cart with items in it is green. I can’t seem to find any setting in the element for this, or anything I can do with CSS. Can you point me in the right direction?
Hi, @tlord11!
I’m just a user, but I’ll try to help you.
I’ve solved this issue with the following steps (Pro Theme):
- Install “WooCommerce Cart Count Shortcode” plugin. Plugin page: https://github.com/prontotools/woocommerce-cart-count-shortcode
- Insert a text element inside your header next to your cart button.
- Edit the text element with your customized “WooCommerce Cart Count” shortcode. I’ve used [cart_button show_items=“true” show_total=“false”].
- Edit the Text element position (margin, padding, etc.).
My site: https://www.lookinside.com.br/
I hope this helps!
Thank you so much, I really appreciate it. Works great for showing the indication, but it doesn’t provide the drop-down mini-cart functionality I want/have with the pro element. I’ll probably go with the drop-down function if I have to pick between the two, but hopefully one of the Pro developer team members can provide some insight.
Hello There,
Thanks for writing in!
Are you using X or Pro theme? By default, you can enable the cart menu in X/Pro > {Launch} > Theme Options > WooCommerce > Navbar Menu. Once enabled, you will have the option to style it adding the color, background colors, cart info, style, layout and more.
And if you are using a custom header, you can always insert and make use of the cart dropdown element, modal or off canvas.
Hope this helps.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.