Commerce relies heavily on base fields. Drupal core has dozens of bugs specific to base field views integration, and they haven't received much attention in the D8 cycle. Let's work around what we can in CommerceEntityViewsData. We can then copy a portion of it to the Entity API module, and then work further up to core.

Our biggest problems are a lack of views integration for non-config bundle fields (i.e. bundle plugin fields such as the ones on payment methods), and the lack of reverse relationships (can't relate a user to their products or orders. Or an order to its payments).

Here is an issue list:
#3096916: Generate reverse relationships for base entity references
#3097072: Bundle plugin fields don't have views integration
#3096931: Add missing views data for address, date, list base fields
#3096953: Create a StoreDate views filter, use it in Promotions
#3057438: Move the commerce_order_views_data_alter() state_machine workaround to CommerceEntityViewsData
#3097581: EntityViewsData generates incorrect data for fields with multiple properties (address, price)
#3097586: Multivalue base fields are missing the "delta" views field
#2914092: Views field handler for bundle field shows machine names for an entity with bundle plugins
#3003105: The views bundle (type) filter shows items that the user doesn't have access to

We should then confirm that the payment & payment_method views work properly, closing #2858042: Cannot create a payment view.

Comments

bojanz created an issue. See original summary.

bojanz’s picture

Title: [meta] Rework the Commerce views integration » [meta] Rework the Commerce base field views integration

Clarifying title, to reduce scope. We're not fixing every Views issue in existence here, just the ones we are inheriting from core.

bojanz’s picture

bojanz’s picture

Issue summary: View changes

Removing #3097667: Use the CommerceEntityViewsData handler for profiles, testing showed it's not needed after all.

bojanz’s picture

Status: Active » Fixed

We're all green :)

Status: Fixed » Closed (fixed)

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