Hi, I need add new "Order Comment" field to my views. Is this posible? Thx

CommentFileSizeAuthor
#6 uc_views_order_comments-765484-6.patch915 bytesm.stenta
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

longwave’s picture

You can add "order comment" as a field to an order view, but if an order has multiple comments, then each will be displayed in a separate row (with duplicate orders). Perhaps some new fields should be added that group all order comments into a single field?

achton’s picture

Subscribing.

dockstaderj’s picture

Subscribing

m.stenta’s picture

Version: 6.x-3.0 » 6.x-3.x-dev
Issue summary: View changes

@longwave: are you sure about that? It looks like the only {uc_order_comments} Views integration is for exposing that as a base table, and then joining in orders. I think it would require some extra stuff to expose that to Views that have {uc_orders} as the base table. I could be wrong about that, though... I always forget what Views data definitions are supposed to look like.

Here is the relevant code: http://cgit.drupalcode.org/uc_views/tree/views/uc_views.views.inc?h=6.x-...

m.stenta’s picture

Status: Active » Needs review
FileSize
915 bytes

Attached is a patch that adds a relationship for uc_orders base Views, so that the uc_order_comments table can be joined in, and comments can be added as fields.

It does NOT provide a way to group multiple comments in a single row, and it does NOT include order admin comments. But it's a start, and maybe someone will find it useful.