You are here

function theme_uc_product_model in Ubercart 7.3

Same name and namespace in other branches
  1. 5 uc_product/uc_product.module \theme_uc_product_model()
  2. 6.2 uc_product/uc_product.module \theme_uc_product_model()

Formats a product's model number.

Parameters

array $variables: An associative array containing:

  • model: Product model number, also known as SKU.
  • attributes: (optional) Array of attributes to apply to enclosing DIV.

Return value

string The HTML output.

2 theme calls to theme_uc_product_model()
uc_product_kit_view in uc_product_kit/uc_product_kit.module
Implements hook_view().
uc_product_view in uc_product/uc_product.module
Implements hook_view().

File

uc_product/uc_product.theme.inc, line 21
Theme functions for uc_product module.

Code

function theme_uc_product_model($variables) {
  $model = $variables['model'];
  $attributes = $variables['attributes'];
  $attributes['class'][] = "product-info";
  $attributes['class'][] = "model";
  $output = '<div ' . drupal_attributes($attributes) . '>';
  $output .= '<span class="product-info-label">' . t('SKU') . ':</span> ';
  $output .= '<span class="product-info-value">' . check_plain($model) . '</span>';
  $output .= '</div>';
  return $output;
}