How to add a line item to show total cost in Ubercart 2?
There is uc_order_pane_line_items_add


  Order pane submit callback: Add a line item to an order.


function uc_order_line_item_add($order_id, $type, $title, $amount, $weight = NULL, $data = NULL) {
  if (is_null($weight)) {
    $weight = _uc_line_item_data($type, 'weight');
  }

  $line_item = array(
    'order_id' =&gt; $order_id, 
    'type' =&gt; $type, 
    'title' =&gt; $title, 
    'amount' =&gt; $amount, 
    'weight' =&gt; $weight, 
    'data' =&gt; $data,
  );
  drupal_write_record('uc_order_line_items', $line_item);

  return $line_item;
}