uc_order_handler_field_money_total.inc 642 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * @file
  4. * Total price field handler.
  5. */
  6. /**
  7. * Field handler: displays a price multiplied by the quantity.
  8. */
  9. class uc_order_handler_field_money_total extends uc_order_handler_field_money_amount {
  10. /**
  11. * Overrides views_handler_field::query().
  12. */
  13. function query() {
  14. $this->ensure_my_table();
  15. $table = $this->table_alias;
  16. $field = $this->real_field;
  17. $params = $this->options['group_type'] != 'group' ? array('function' => $this->options['group_type']) : array();
  18. $this->field_alias = $this->query->add_field(NULL, "$table.$field * $table.qty", $this->table . '_' . $this->field, $params);
  19. }
  20. }