You are here

function theme_uc_payment_totals in Ubercart 7.3

Same name and namespace in other branches
  1. 6.2 payment/uc_payment/uc_payment.module \theme_uc_payment_totals()

Generates markup for payment totals.

1 theme call to theme_uc_payment_totals()
uc_checkout_pane_payment in payment/uc_payment/uc_payment_checkout_pane.inc
@file Checkout pane functions for uc_payment.module.

File

payment/uc_payment/uc_payment.theme.inc, line 13
Theme functions for the uc_payment module.

Code

function theme_uc_payment_totals($variables) {
  $order = $variables['order'];
  $line_items = uc_order_load_line_items_display($order);
  $output = '<table id="uc-order-total-preview">';
  foreach ($line_items as $line) {
    if (!empty($line['title'])) {
      $attributes = drupal_attributes(array(
        'class' => array(
          'line-item-' . $line['type'],
        ),
      ));
      $output .= '<tr' . $attributes . '><td class="title">' . filter_xss($line['title']) . ':</td>' . '<td class="price">' . theme('uc_price', array(
        'price' => $line['amount'],
      )) . '</td></tr>';
    }
  }
  $output .= '</table>';
  return $output;
}