0

I need to edit /complete page. Is there a way to show items from the current order, and possibly shipping info?

Is there something like:

{{order_entity.getOrderShippingInfo}}

or

{{order_entity.getOrderItems}}
David Kovač
  • 153
  • 10

1 Answers1

0

I managed to display ordered items using :

 {% for order_item in order_entity.getItems %}
    {{ order_item.getQuantity|number_format }} x
      {% if order_item.hasPurchasedEntity %}
      {{ order_item.getPurchasedEntity|commerce_entity_render('summary') }}
      {% else %}
      {{- order_item.label -}}
      {% endif %}
      {{- order_item.getTotalPrice|commerce_price_format -}}
  {% endfor %}

Though I still can't get the order Billing or Shipping info.

David Kovač
  • 153
  • 10
  • This code was helpful for the order email receipt. However, the "summary" renders a bunch of info... how can I get it to only render the extra fields from the ordered product (order item type)? – hockey2112 Jul 22 '19 at 21:53