You are here

function theme_uc_product_price in Ubercart 6.2

Same name and namespace in other branches
  1. 8.4 uc_product/uc_product.theme.inc \theme_uc_product_price()
  2. 5 uc_product/uc_product.module \theme_uc_product_price()
  3. 7.3 uc_product/uc_product.theme.inc \theme_uc_product_price()

Formats a product's price.

This is an extra wrapper theme around the output of uc_price() when it is used in the product body. For expedience, it takes the same parameters as uc_price().

Parameters

$price: The monetary amount.

$context: Determines the CSS class of the <div>, and helps determine if the price needs to be altered.

$options: Toggles the label and other formatting.

See also

uc_price()

1 theme call to theme_uc_product_price()
uc_product_view in uc_product/uc_product.module
Implements hook_view().

File

uc_product/uc_product.module, line 1535
The product module for Ubercart.

Code

function theme_uc_product_price($price, $context, $options = array()) {
  $output = '<div class="product-info ' . implode(' ', (array) $context['class']) . '">';
  $output .= uc_price($price, $context, $options);
  $output .= '</div>';
  return $output;
}