PRO Header - Hide Cart When Empty?

Is there a way PRO Header to hide the cart element when it is empty? I saw the JS workaround in the forums but it is old and displays for a second on page loads. Was hoping there would be some updated method available by now? Thanks in advance!

Hey @GraceOC,

Thanks for reaching out!

If you are using the cart element in displaying your cart products, you can use this dynamic content to show only the cart element when the cart items is greater than 0.

The condition type is number, the condition must be {{dc:woocommerce:cart_items}} > 0.

Hope that helps.

Thank you, but that does not appear to be working. I added the condition and went to my site, added an item to the cart and the button did not appear.

Hello @GraceOC,

If that is the case, please provide us access to the site so we can investigate. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

Ok I will attach a secure note to this post. Here is the location of the cart icon for your reference,

Hello @GraceOC,

It seems that you have not added the username to the given credentials, I would request you please share your website Username so that we can access your site dashboard and check it on our end.

Thanks

Sorry, I updated the secure note.

Hey @GraceOC,

The password is still incorrect. Please double-check.

Thanks.

My apologies, the note is updated, and I validated and tested the login.

Hello @GraceOC,

I would suggest you please update the conditions with this dynamic content code {{dc:woocommerce:cart_items_raw}}

Main-Header-Header-Cornerstone

Hope it helps
Thanks

That worked thank you. I tried that yesterday but maybe it didn’t erase the other condition first.

You are most welcome @GraceOC

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