You are here

function theme_uc_cart_block_content in Ubercart 6.2

Same name and namespace in other branches
  1. 5 uc_cart/uc_cart.module \theme_uc_cart_block_content()
  2. 7.3 uc_cart/uc_cart.theme.inc \theme_uc_cart_block_content()

Themes the shopping cart block content.

Parameters

$help_text: Text to place in the small help text area beneath the cart block title or FALSE if disabled.

$items: An associative array of item information containing the keys 'qty', 'title', 'price', and 'desc'.

$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 cart summary.

1 theme call to theme_uc_cart_block_content()
uc_cart_block in uc_cart/uc_cart.module
Implements hook_block().

File

uc_cart/uc_cart.module, line 640

Code

function theme_uc_cart_block_content($help_text, $items, $item_count, $item_text, $total, $summary_links) {
  $output = '';

  // Add the help text if enabled.
  if ($help_text) {
    $output .= '<span class="cart-help-text">' . $help_text . '</span>';
  }

  // Add a wrapper div for use when collapsing the block.
  $output .= '<div id="cart-block-contents">';

  // Add a table of items in the cart or the empty message.
  $output .= theme('uc_cart_block_items', $items);
  $output .= '</div>';

  // Add the summary section beneath the items table.
  $output .= theme('uc_cart_block_summary', $item_count, $item_text, $total, $summary_links);
  return $output;
}