Added custom field (‘field_secretkey’) under Commerce – Product variation (admin/commerce/config/product-variation-types).
I am able to get this value in Orders view by adding the “Product variation” relationship.
I just want to print this value in order confirmation email (commerce-order-receipt.html.twig) It can have multiple items with different values.
Please advice.
Example:
No | Product Name | Custom field
1 | Product 01 | XYUSNMAI
2 | Product 02 | AYUSSAAA
3 | Product 03 | PAUSNPPP
Updated: RESOLVED – TRY BELOW
URL – {{ order_item.getPurchasedEntity.field_custom_field.0.uri }}
TITLE – {{ order_item.getPurchasedEntity.field_custom_field.0.title }}