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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

FatherShawn created an issue. See original summary.

FatherShawn’s picture

Added the default handler and fields appeared.

Anonymous’s picture

Great 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.

abramm’s picture

The 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.

abramm’s picture

Status: Active » Reviewed & tested by the community
FileSize
73.84 KB

Screenshot of patch #2 + 2898635 #11.

bojanz’s picture

Title: Payment Method is not available to Views. » The payment method entity tyoe is not exposed to Views

Retitling for clarity.

bojanz’s picture

Rerolling for CommerceEntityViewsData, introduced in #2882374: Views filters are broken for price fields ("number" column).

bojanz’s picture

Title: The payment method entity tyoe is not exposed to Views » The payment method entity type is not exposed to Views

  • bojanz committed c80b602 on 8.x-2.x authored by FatherShawn
    Issue #2900772 by FatherShawn, abramm, bojanz: The payment method entity...
bojanz’s picture

Thanks, everyone!

bojanz’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.