Hello,

I'd like to add a column in licenses list containing the order ID.

I tried to add a relation in the view but I couldn't get it.

Any solution is welcome.

Thank you

Comments

lbogdan created an issue. See original summary.

sam0971’s picture

I think you should add a relation to the commerce line item in your view.

Kazanir’s picture

The only reference to "the" order for a license is on the line item which was part of the cart at checkout, referencing the license via the commerce_license field. By using a reverse entity reference lookup (provided by the entityreference module) in Views and then adding an additional relationship to the order from the line item, we can add the order ID to the default view. This will break if you are using multiple cart orders for a given Commerce License, but it still seems really helpful so I've added it to the defaults.

  • Kazanir committed 167ad5d on 7.x-1.x
    Issue #2829573 by Kazanir: Add order ID in licenses list
    
Kazanir’s picture

Fixed.

Kazanir’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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