How can I set a Drupal Commerce shopping cart block to only display if it contains items? I'd like to hide the cart block when the cart is empty.
The solution that worked for me is not just hiding this "your shopping cart is empty" but also hiding all possible long list of items. And you can accomplish this using views:
- create two fields of text links, one for view cart and another for checkout.
- Add another field to display the total amount. Look for "add commerce order: order total" I got this idea from this
- Filter criteria: commerce order to >=1. This will make block disappear when the order is greater than 1.
- Apply some css.