You are here

function uc_order_handler_field_weight_total::query in Ubercart 7.3

Overrides views_handler_field::query().

Overrides views_handler_field::query

File

uc_order/views/uc_order_handler_field_weight_total.inc, line 16
Total weight field handler.

Class

uc_order_handler_field_weight_total
Field handler: displays a weight multiplied by the quantity.

Code

function query() {
  $this
    ->ensure_my_table();
  $table = $this->table_alias;
  $field = $this->real_field;
  $params = $this->options['group_type'] != 'group' ? array(
    'function' => $this->options['group_type'],
  ) : array();
  $this->field_alias = $this->query
    ->add_field(NULL, "{$table}.{$field} * {$table}.qty", $this->table . '_' . $this->field, $params);
  $this
    ->add_additional_fields();
}