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
}

Website & Email Hosting

Get the best website & email hosting for speed, security, and peace of mind. No restrictions. Freedom to do what you need in order to run your business.

Host Now

Pin It on Pinterest