function theme_uc_attribute_options in Ubercart 5
Format an attribute and its options.
1 theme call to theme_uc_attribute_options()
- theme_uc_attribute in uc_attribute/
uc_attribute.module - Display formatted of data associated with attributes
File
- uc_attribute/
uc_attribute.module, line 1454
Code
function theme_uc_attribute_options($aid, $nid) {
$attribute = uc_attribute_load($aid, $nid, 'product');
$output .= '<h2>' . $attribute->name . '</h2>';
$rows = array();
foreach ($attribute->options as $key => $input) {
$rows[] = array(
$input->oid,
$input->name,
);
}
if (count($rows) == 0) {
$rows[] = array(
array(
'data' => t('(To be determined by customer.)'),
'colspan' => '2',
),
);
}
$header = array(
t('Option ID'),
t('Name'),
);
$output .= theme('table', $header, $rows);
return $output;
}