Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi, I need add new "Order Comment" field to my views. Is this posible? Thx
Comment | File | Size | Author |
---|---|---|---|
#6 | uc_views_order_comments-765484-6.patch | 915 bytes | m.stenta |
Comments
Comment #1
longwaveYou 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?
Comment #3
achtonSubscribing.
Comment #4
dockstaderj CreditAttribution: dockstaderj commentedSubscribing
Comment #5
m.stenta@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-...
Comment #6
m.stentaAttached 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.