Score:0

Get the value of Entity reference revisions field in order email twig file

ls flag

I want to get the entity reference field value in order email.

Name of the entity reference is field_price_value and called paragraph field is field_price now I want to get the field price value I tried below method but none work for me

 order_entity.field_price_value.field_price.value

 {% for order_item in order_entity.getItems %}

{{ order_item.getPurchasedEntity.getfield_price_value.getfield_price

{% endif %}
Score:1
fo flag

I think you would do it like this (if I'm understanding your scenario correctly):

{{ node.field_price_value.entity.field_price.value }}

Also this question has been asked and responded to before, you may find this helpful: Twig get value of field in entity reference

Good luck!

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.