You are here

uc_payment.theme.inc in Ubercart 7.3

Theme functions for the uc_payment module.

File

payment/uc_payment/uc_payment.theme.inc
View source
<?php

/**
 * @file
 * Theme functions for the uc_payment module.
 */

/**
 * Generates markup for payment totals.
 *
 * @ingroup themeable
 */
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;
}

Functions

Namesort descending Description
theme_uc_payment_totals Generates markup for payment totals.