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?
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | uc_views-money-amount-782902.patch | 504 bytes | aether |
Comments
Comment #1
theunraveler commentedI have noticed this as well. It also seems to be happening with the Order Product: Price field as well.
Comment #2
betz commentedsubscribing
Comment #3
melon commentedsubscribing
Comment #4
dan carlson commentedsubscribe...
also if you sort on this column the prices will appear.
Comment #5
diricia commentedThe 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.
Comment #6
nick_vhRecon this! If you order the prices will show up. Default ordering doesn't return the price.
Comment #7
nick_vhIf 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!
Comment #8
demm commentedsubscribing
Comment #9
vacilando commentedSame 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.
Comment #10
emasters commentedI 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.
Comment #11
guypaddock commentedI am seeing this behavior as well.
Comment #12
mikele commentedsubscribe
Comment #13
dave bruns commentedJust 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)
Comment #14
Ari Gold commentedsubscribe
Comment #15
aether commentedFor 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.
Comment #16
pyrello commentedI 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
Comment #17
peterjmag commentedThe 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.
Comment #18
madsph commentedAs 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.
Comment #19
roman_l commentedSame 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!)
Comment #20
core44 commentedRecon this! Very funny.
Comment #21
longwave