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 would like to display the payment method the customer chose on the Orders view, but so far I couldn't figure out how to add that field. I have 3 payment methods. An off-site credit card payment method (custom module), a bank transfer method and another one which means you'll pay for your order in the store personally.
Can someone help me how to do this?
Thanks!
Comments
Comment #1
rszrama CreditAttribution: rszrama commentedRight now the only way to do it would be through a theme template unfortunately. It's a good feature request for the Payment module, though.
Comment #2
rszrama CreditAttribution: rszrama commentedComment #3
gomino CreditAttribution: gomino commentedAny help to do it through themes?
Thanks
Comment #4
leex CreditAttribution: leex commentedIt's possible to do this using another module: http://drupal.org/project/views_field_view
Firstly, make a new block on the 'commerce_payment_order' view and remove all fields but the 'Payment method' (remember to override, don't remove the fields from the master display). The contextual filter should already be setup to accept the Order ID. Name this display appropriately.
Now go back to your display and add the views field, selecting the view you just made. Also if you haven't done so already, add the order ID field and arrange it above the views field so that the order ID is available to pass to the views field as the contextual filter.
Edit the views field and set the order id raw as the contextual filter, then you should be good to go!
Comment #4.0
leex CreditAttribution: leex commentedgrammar