You are here

function _uc_product_fields_summarize in Ubercart 6.2

Summary callback for product fields settings.

See also

uc_product_field_settings_form()

1 string reference to '_uc_product_fields_summarize'
uc_product_field_settings_form in uc_product/uc_product.admin.inc
Allows store administrators to control what product information is relavent to their store.

File

uc_product/uc_product.admin.inc, line 256
Product administration menu items.

Code

function _uc_product_fields_summarize($form, $options, $enabled, $weight) {
  $fields = array();
  foreach ($options as $field => $label) {
    if ($enabled[$field]) {
      $fields[$field] = array(
        'enabled' => $enabled[$field],
        'weight' => $weight[$field],
        'data' => $label,
      );
    }
  }
  uasort($fields, 'uc_weight_sort');
  foreach ($fields as $field) {
    $item[] = $field['data'];
  }
  $items[] = array(
    'data' => t('Displayed product fields:'),
    'children' => $item,
  );
  return $items;
}