When creating a simple list of orders, the order total column always shows $0.00, if you look at the sql it never actually adds the order_total field in the query.

I tracked issue down to the field handler, uc_views_handler_field_money_amount which extends uc_product_handler_field_price.

The uc_product_handler_field_price class implements its own query function and removed the field from the query? So not sure if the issue is in that class.

One solution is to add a query function back into the file:
uc_views/views/uc_views_handler_field_money_amount.inc

  function query() {
    $this->ensure_my_table();
    // Add the field.
    $this->field_alias = $this->query->add_field($this->table_alias, $this->real_field);

    $this->add_additional_fields();
  }

Comments

tobiberlin’s picture

subscribing, same here

4kant’s picture

subscribing.
Same with sell-price and cost...

Had the fault definitively after updating from dev-version (30.6.09) to each of the newer versions.

redben’s picture

subscribing. Using uc_views 6.x-3.0

thinkel6’s picture

Version: 6.x-3.x-dev » 6.x-3.0

subscribing, same issue

torgospizza’s picture

Had this issue since I upgraded to D6, and the solution in the OP worked for me. Thanks, Univate!

madsph’s picture

I think this is related to an old issue: #614032: Views with Order total field blank in UC2.0 from around comment #20 although I think the whole thread gives insight to the cause of the problem.

redben’s picture

Apparently you have to upgrade to ubercart 2.x-dev. see comment http://drupal.org/node/614032#comment-2436618 on #614032: Views with Order total field blank in UC2.0

hanoii’s picture

Status: Active » Closed (duplicate)

Also, a bit duplicate of #666038: handler 'uc_views_handler_field_money_amount' fails.

Please read #16 in there in which I explain the real cause of this problem and why ubercart 2.2 doesn't work. If you wish, instead of using -dev, you could just apply the patch mentioned there.