Title: Cart problems
Last modified: August 22, 2016

---

# Cart problems

 *  Resolved [spakainas](https://wordpress.org/support/users/spakainas/)
 * (@spakainas)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/cart-problems-1/)
 * Hello,
    First of all – thank you for your plugin! 🙂
 * I have some trouble figuring out.
 * In header.php of my template I want to put a function which would do a basic 
   thing:
    If the cart is empty – don’t show an image and a link If the cart is 
   not empty – show an image and a link
 * I know it’s simple, but I can’t figure out how to do it.
 * Thank you in advance. Cheers!
 * [https://wordpress.org/plugins/thecartpress/](https://wordpress.org/plugins/thecartpress/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [spakainas](https://wordpress.org/support/users/spakainas/)
 * (@spakainas)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/cart-problems-1/#post-5807844)
 * Nevermind, solved it after like 4 hours 😀
 * Was very simple really.
 *     ```
       <?php // Display Empty Shopping Cart messages
       	$shoppingCart = TheCartPress::getShoppingCart();
       if ( $shoppingCart->isEmpty() ) { ?>
   
       		<?php } else { ?>
       		DO CODE
       		<?php } ?>
       ```
   
 *  Plugin Author [Inigo Gonzalez](https://wordpress.org/support/users/inigoini/)
 * (@inigoini)
 * [11 years, 2 months ago](https://wordpress.org/support/topic/cart-problems-1/#post-5807848)
 * Hi,
 * Great!!!!
 * Best regards

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Cart problems’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/thecartpress_fefefe.svg)
 * [TheCartPress eCommerce Shopping Cart](https://wordpress.org/plugins/thecartpress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/thecartpress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/thecartpress/)
 * [Active Topics](https://wordpress.org/support/plugin/thecartpress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/thecartpress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/thecartpress/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Inigo Gonzalez](https://wordpress.org/support/users/inigoini/)
 * Last activity: [11 years, 2 months ago](https://wordpress.org/support/topic/cart-problems-1/#post-5807848)
 * Status: resolved