Checkout: See how many items are in the cart

Use this code snippet to check how many items are in the shopping cart. If it returns zero (0) there aren’t any items in the cart at the moment.

global $Item, $Order;
$co_id = $Order -> cart_order();
$item_count = $Item -> item_count($co_id, 'items');

if (!empty($item_count) && $item_count > 0) {
	//there are items in the cart
}

Earn Money by Referring People

Refer customers to us with your affiliate link and earn commission on sales from your link.

Get Started

Pin It on Pinterest