Tips and Tricks HQ Support

Support site for Tips and Tricks HQ premium products

  • Home
  • Contact Us
  • Documentation
  • Forum Home
    • Forum
    • Forum Search
    • Forum Login
    • Forum Registration

eStore – How to hide empty cart widget

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

  • This topic has 3 replies, 3 voices, and was last updated 11 years, 7 months ago by admin.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • December 15, 2012 at 4:11 pm #8166
    archenemys
    Member

    How can I hide the shopping cart widget only when it is empty?

    https://support.tipsandtricks-hq.com/forums/topic/how-to-hide-shopping-cart-widget-altogether-when-empty

    December 15, 2012 at 11:08 pm #52447
    admin
    Keymaster

    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:

    http://www.tipsandtricks-hq.com/ecommerce/?p=460

    October 7, 2013 at 6:04 am #52448
    advexp
    Member

    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!

    October 7, 2013 at 10:45 pm #52449
    admin
    Keymaster

    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

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Log In

Forum Related

  • Forum Home
  • Forum Search
  • Forum Registration
  • Forum Login

Support Related Forms

  • Contact Us
  • Customer Support
  • Request a Plugin Update
  • Request Fresh Download Links

Useful Links

  • Plugin Upgrade Instructions
  • WP eStore Documentation
  • WP eMember Documentation
  • WP Affiliate Platform Documentation
  • Tips and Tricks HQ Home Page
  • Our Projects

Quick Setup Video Tutorials

  • WP eStore Video Tutorial
  • WP eMember Video Tutorial
  • WP Affiliate Platform Video Tutorial
  • Lightbox Ultimate Video Tutorial

Our Other Plugins

  • WP Express Checkout
  • Stripe Payments Plugin
  • Simple Shopping Cart Plugin
  • Simple Download Monitor

Copyright © 2025 | Tips and Tricks HQ