I have installed the latest stable version 6.x-3.0 and from the start, the Order Total column shows zero in the Order Management view. On digging a little bit through the code, the problem seems to be in the uc_views_handler_field_money_amount.inc :

 return uc_price($values->{$this->field_alias}, $context);

$this->field_alias is 'unknown' here. $this->real_field is correctly set to 'order_total' but the $values being passed to render has no member by that name.

Anyone else seeing this issue?

CommentFileSizeAuthor
#15 uc_views-money-amount-782902.patch504 bytesaether

Comments

theunraveler’s picture

I have noticed this as well. It also seems to be happening with the Order Product: Price field as well.

betz’s picture

subscribing

melon’s picture

subscribing

dan carlson’s picture

subscribe...

also if you sort on this column the prices will appear.

diricia’s picture

Priority: Normal » Critical

The order total is zero when creating any view with that field, not just the default views.
My finance department won't be able to do proper recon without the amounts showing.

nick_vh’s picture

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

Recon this! If you order the prices will show up. Default ordering doesn't return the price.

nick_vh’s picture

If you change the uc_views.views.inc line 294 to
'handler' => 'views_handler_field_numeric' instead of
'handler' => 'uc_views_handler_field_money_amount', the view does return the correct amount.

I'm not really a views developer and I get scared if I see that code.. So if somebody please can take a look why this column of the uc_orders table isn't included in the view? It would make an awesome patch!

demm’s picture

subscribing

vacilando’s picture

Same problem.

It is true that when the Total column is manually (!) sorted then the amounts show, but not otherwise.

I confirm that Nick_vh's solution from #7 solves this problem.
Could the developer(s) kindly fix this in the code.
Thank you.

emasters’s picture

I can confirm that the fix in #7 solves this issue with the total order value not displaying in views. Problem is with the handler "uc_views_handler_field_money_amount", I think, but I got lost trying to track it through CVS.

guypaddock’s picture

I am seeing this behavior as well.

mikele’s picture

subscribe

dave bruns’s picture

Just making a note that the fix described in #7 above also has to be made at line 70 for uc_order_products : price if you are trying to display line item price info. Otherwise, this field will display zero as well (as noted in #1)

Ari Gold’s picture

subscribe

aether’s picture

Status: Active » Needs review
StatusFileSize
new504 bytes

For some reason the field is not getting included in the views query. Seems like relevant code in hook_views_data() would be enough to include it but I guess not.

I have attached a patch against 6.x-3.x-dev that adds the field to the query in uc_views_handler_field_money_amount.inc. Seems to work.

pyrello’s picture

I did a brief test of the patch above (#15) and it appears to work, at least for the default view I was working with.

Sean

peterjmag’s picture

The patch in #15 worked for me against 6.x-3.0 (latest stable version of uc_views). Tested with the module's default views and with a couple of custom-built views as well.

madsph’s picture

Status: Needs review » Closed (duplicate)

As explained in #666038: handler 'uc_views_handler_field_money_amount' fails, #729460: Order Total is always displayed as $0.00 and #632266: better support for every order line items and better price handler this issue is related to a change in the ubercart API, which has been in development for quite a while, but which has been released as Ubercart 6.x-2.3. I have tested with that version and am not able to reproduce the behaviour described here.

roman_l’s picture

Status: Closed (duplicate) » Active

Same problem and with 2.4 version of Ubercart (why would it work with 2.3 and not 2.4 if the uc API has been fixed?)
The patch on #15 works but breaks unit product price display (strange, but it shows tax amount!)

core44’s picture

Recon this! Very funny.

longwave’s picture

Status: Active » Closed (cannot reproduce)