Discussions

Flag items in basket

Is there some sort of global variable that tells us if the items in basket?

Posted: May 15, 2012

Comments

stevetook on May 15, 2012

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