Commerce: is there something in the basket? Is there a global variable of sorts that can be used as a bool to determine if something is 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;
}