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

Reply To: how to hide shopping cart widget altogether when empty?

by

Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › WP eStore Tweaks › how to hide shopping cart widget altogether when empty? › Reply To: how to hide shopping cart widget altogether when empty?

November 12, 2009 at 2:09 am #15947
amin007
Participant

Update: The post has an easier method of only showing the cart when there are items in it:

https://support.tipsandtricks-hq.com/forums/topic/estore-want-to-hide-empty-cart-widget


Find the following bit of code in “wp_eStore1.php” file (this is what displays the widget):

function show_wp_digi_cart_widget($args)
{
extract($args);

$cart_title = get_option('wp_eStore_widget_title');
if (empty($cart_title)) $cart_title = 'Shopping Cart';

echo $before_widget;
echo $before_title . $cart_title . $after_title;
echo print_wp_digi_cart();
echo $after_widget;
}

Now add the following at the start of the function (before the line with the “extract” statement) so it doesn’t display the widget if there are no items in the shopping cart:

if (!digi_cart_not_empty())
{
return;
}

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