How do you get a node ID from an order in ubercart? How do you get a node ID from any of the products in an ubercart order?

I'm trying to get the product author's (uid) from the order as shown below 

The order will only contain nodes/products by the same author so a node ID from any of the products in the order will do.

$sid = db_query("SELECT uid FROM {node} WHERE nid = :nid", array(':nid' => $product->nid))->fetchField();

$seller = user_load($sid);
I should have been clearer, its ubercart marketplace.

I got it to work this way:

$items = uc_cart_get_contents();
foreach ($items as $item) {
$product = node_load($item->nid);
      }