Commerce: is there something in the basket?
This is what i use :)

function items_on_cart(){
  global $user;
  $cart = commerce_cart_order_load($user-&gt;uid);
  $line_items = count($cart-&gt;commerce_line_items) ? true : false;
  return $line_items;
}