- This topic has 3 replies, 3 voices, and was last updated 11 years ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › eStore – How to hide empty cart widget
Tagged: cart empty, hide cart, hide widget, shopping cart, side bar, widget
How can I hide the shopping cart widget only when it is empty?
Yes, that tweak should work but we also have shortcodes for this now.
Do the following:
1) Add a standard WordPress Text widget to your sidebar
2) Use the following shortcode in the body of the widget:
[wp_eStore_cart_when_not_empty]
The above shortcode only shows the cart when it is not empty
Alternatively, you could add the following line of PHP code in your sidebar.php of your theme’s template file where you want to show this cart widget:
<?php do_shortcode('[wp_eStore_cart_when_not_empty]'); ?>
All the estore plugin shortcodes are listed in our documentation here:
I’ve been using the WP Cart for Digital Products widget in the side bar. I’m trying to include the shopping cart info in the side bar ONLY if there is something in the cart (not even a grey/empty cart logo). I used the short code listed above – [wp_eStore_cart_when_not_empty], but it shows all the cart info in the side bar. What I would like to show is just 2 simple lines of info: “X items in the shopping cart” and below that an html link “View Cart”. I was able to accomplish this on a previous version, but after upgrading to the latest version of eStore, it was not working any more. I also looked at the list of short codes and couldn’t figure out how it was set up before. Thanks so much for your direction!
Use one of our compact shopping cart shortcodes and that should do it:
http://www.tipsandtricks-hq.com/ecommerce/wp-estore-compact-cart-display-templates-1527