You are here

function theme_uc_cart_block_summary in Ubercart 6.2

Same name and namespace in other branches
  1. 7.3 uc_cart/uc_cart.theme.inc \theme_uc_cart_block_summary()

Themes the summary table at the bottom of the default shopping cart block.

Parameters

$item_count: The number of items in the shopping cart.

$item_text: A textual representation of the number of items in the shopping cart.

$total: The unformatted total of all the products in the shopping cart.

$summary_links: An array of links used in the summary.

1 theme call to theme_uc_cart_block_summary()
theme_uc_cart_block_content in uc_cart/uc_cart.module
Themes the shopping cart block content.

File

uc_cart/uc_cart.module, line 726

Code

function theme_uc_cart_block_summary($item_count, $item_text, $total, $summary_links) {
  $context = array(
    'revision' => 'themed-original',
    'type' => 'amount',
  );

  // Build the basic table with the number of items in the cart and total.
  $output = '<table class="cart-block-summary"><tbody><tr>' . '<td class="cart-block-summary-items">' . $item_text . '</td>' . '<td class="cart-block-summary-total"><label>' . t('Total:') . '</label> ' . uc_price($total, $context) . '</td></tr>';

  // If there are products in the cart...
  if ($item_count > 0) {

    // Add a view cart link.
    $output .= '<tr class="cart-block-summary-links"><td colspan="2">' . theme('links', $summary_links) . '</td></tr>';
  }
  $output .= '</tbody></table>';
  return $output;
}