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.
I created a view of Payments and enabled a relationship to Payment Method. No Payment Method fields were available. Looking at the annotation, there was no views_data handler.
Comment | File | Size | Author |
---|---|---|---|
#5 | vadym_Selection_0437.png | 73.84 KB | abramm |
#2 | payment_method_views_data-2900772-1.patch | 749 bytes | FatherShawn |
Comments
Comment #2
FatherShawnAdded the default handler and fields appeared.
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedGreat your patch is working, after applying I see now the payment method entity. Now we need a formatter for the payment method like the original one.
Comment #4
abrammThe patch above works just perfect.
As for the missing fields, there's a core issue:
https://www.drupal.org/project/drupal/issues/2898635
Applying the patch at https://www.drupal.org/files/issues/2898635-11.drupal.bundleFieldDefinit... adds field definitions. Nothing more should be done in Commerce, that's a core issue.
I'd recommend commiting the patch and waiting for #2898635 in core.
Comment #5
abrammScreenshot of patch #2 + 2898635 #11.
Comment #6
bojanz CreditAttribution: bojanz at Centarro commentedRetitling for clarity.
Comment #7
bojanz CreditAttribution: bojanz at Centarro commentedRerolling for CommerceEntityViewsData, introduced in #2882374: Views filters are broken for price fields ("number" column).
Comment #8
bojanz CreditAttribution: bojanz at Centarro commentedComment #10
bojanz CreditAttribution: bojanz at Centarro commentedThanks, everyone!
Comment #11
bojanz CreditAttribution: bojanz at Centarro commented