Trouble theming Ubercart's cart page (Drupal 7) using hook_theme
uc_cart_view() is not a form builder; it is a page callback. As such, theme_uc_cart_view() is not automatically called for uc_cart_view(). It is the page callback that needs to call the necessary theme function, or refer it such as in the following code.

  if (empty($items)) {
    return array(
      '#theme' =&gt; 'uc_empty_cart',
    );
  }


What you can do is the following:


Implement hook_menu_alter() to alter the page callback invoked for http://example.com/cart.

function mymodule_menu_alter(&amp;$items) {
  if (isset($items['cart'])) {
    $items['cart']['page callback'] = 'mymodule_cart_view';
  }
}

Implement the page callback to output the content as you want it to be.


I cannot suggest the code to write for mymodule_cart_view(). Looking at the code used from uc_cart_view(), I notice the main part is the following one.

  // Load the array of shopping cart items.
  $items = uc_cart_get_contents();

  // Display the empty cart page if there are no items in the cart.
  if (empty($items)) {
    return array(
      '#theme' =&gt; 'uc_empty_cart',
    );
  }

  $build = array();
  // Load through the cart panes...
  foreach (uc_cart_cart_pane_list($items) as $id =&gt; $pane) {
    // If the pane is enabled...
    if ($pane['enabled']) {
      // Add its output to the cart view.
      $build[$id] = $pane['body'];
    }
  }


What a page callback can return, in Drupal 7 is:


a string containing the markup to output
an array accepted from drupal_render(), such as the following ones

$build = array(
  '#theme' =&gt; 'node', 
  '#node' =&gt; $node, 
  '#view_mode' =&gt; $view_mode, 
  '#language' =&gt; $langcode,
);




$block = array(
  '#markup' =&gt; '&lt;em&gt;' . t('There are no rows matching the selected criteria') . '&lt;/em&gt;'.
);




$styles = array(
  '#type' =&gt; 'styles', 
  '#items' =&gt; $css,
);



As side note, in your theme definition, the template filename cannot be "cart"; as the template file is for "uc_cart_view" you can report it to be "uc_cart_view" or "uc-cart-view." Any other filenames are not accepted, from Drupal.