Skip to content

Instantly share code, notes, and snippets.

@init90
Created January 18, 2021 11:44
Show Gist options
  • Save init90/bc08699e9719ab5d647d8cdd6645cc33 to your computer and use it in GitHub Desktop.
Save init90/bc08699e9719ab5d647d8cdd6645cc33 to your computer and use it in GitHub Desktop.
Drupal 8, show attributes from order item.
{% for attribute_data in order_item.getPurchasedEntity().getAttributeValues() %}
<tr>
<td align="left" valign="top" class="product-attr" style="color: #000000; font-family: 'Nunito Sans', sans-serif; font-weight: 400; font-size: 14px; line-height: 22px;">{{ attribute_data.getAttribute().label() }}: {{ attribute_data.label() }}</td>
</tr>
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment