You are here

function uc_attribute_node_update_index in Ubercart 7.3

Same name and namespace in other branches
  1. 8.4 uc_attribute/uc_attribute.module \uc_attribute_node_update_index()

Implements hook_node_update_index().

File

uc_attribute/uc_attribute.module, line 433
Ubercart Attribute module.

Code

function uc_attribute_node_update_index($node) {
  $output = '';
  $attributes = uc_product_get_attributes($node->nid);
  foreach ($attributes as $attribute) {
    $output .= '<h3>' . _uc_attribute_get_name($attribute) . '</h3>';
    foreach ($attribute->options as $option) {
      $output .= $option->name . ' ';
    }
    $output .= "\n";
  }
  $result = db_query("SELECT model FROM {uc_product_adjustments} WHERE nid = :nid", array(
    ':nid' => $node->nid,
  ));
  while ($model = $result
    ->fetchField()) {
    $output .= '<h2>' . $model . "</h2>\n";
  }
  return $output;
}