I have created an "Event Registration" product type and order item type. In the order item type, I added fields for the registrant's name and job title (and a few other pieces of info), which are then displayed in the Add To Cart form. How can I print the submitted values for those fields in the commerce-order-receipt.html.twig?

Thanks!

Comments

hockey2112 created an issue. See original summary.

hockey2112’s picture

I am a step closer to a solution. I added the following code from commerce-checkout-order-summary.html.twig to my commerce-order-receipt.html.twig file:

{% for order_item in order_entity.getItems %}
	{{ order_item|commerce_entity_render('summary') }}
{% endfor %}

This renders a summary that looks like this:

Mon, 07/22/2019 - 13:08
Purchased entity
Price
$10.00
Quantity
1.00
Unit price
$10.00
Total price
$10.00
Job Title
CEO

The Job Title data is the info I really need to print in the order email; the rest of the "summary" data needs to be removed. How can I modify the summary portion of the code to only pull that specific field into the order receipt email, and ignore the rest of the summary data shown above?

hockey2112’s picture

Figured it out! Took a few steps:

  1. I created a View of type: Order Item. Added my custom fields to that view (Job Tite, etc). Added a Contextual Filter "Order item: ID". Provide Default Value: Content ID from URL.
  2. I created a Viewfield on each of my Order Item Types, using the View I created in the previous step.
  3. I went to /admin/commerce/config/order-item-types/default/edit/display and hid all the fields except for the Viewfield. Repeat for the other Order Item Types.
  4. In commerce-order-receipt.html.twig, add this code (which was found in commerce-checkout-order-summary.html.twig):
    {{ order_item|commerce_entity_render('summary') }}
  5. Style the output as you like in the receipt twig. Here is the pertinent portion of mine in case anyone finds it helpful:
            <tr>
              <td>
                {% block order_items %}
                <table style="padding-top: 15px; padding-bottom:15px; width: 100%">
                  <tbody style="text-align: left;">
                  {% for order_item in order_entity.getItems %}
                  <tr>
                    <td>
                      <span style="font-size: 15px;">
    			{{ order_item.getQuantity|number_format }} x 
    			<span style="font-weight: bold;">{{ order_item.label }}</span>
    			<span style="float: right;">{{ order_item.getTotalPrice|commerce_price_format }}</span>
    		  </span>
    		  <br>
    		  {{ order_item|commerce_entity_render('summary') }}
    		  <br><br><hr><br>
                    </td>
                  </tr>
                  {% endfor %}
                  </tbody>
                </table>
                {% endblock %}
              </td>
            </tr>
    
  6. Clear cache, and that's it!
hockey2112’s picture

On a related note, I was able to print an Order field like this:

{% if order_entity.field_purchase_order_number.value %}
   PO # {{ order_entity.field_purchase_order_number.value }}
{% endif %}
bojanz’s picture

Status: Active » Fixed

Thank you for documenting your journey :)

Status: Fixed » Closed (fixed)

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

cayenne’s picture

Thank you so much for posting this.

May I ask another question: did you just rewrite the twig file in place, move it to your theme, or, what I would like to do, override it in a custom module?

If the final choice, I'd LOVE a code snippet to make it work!

pozi’s picture

Best way to overwrite template from contrib module is to create your custom one.
Then in file custom_module_name.module you need to define hook - hook_theme()

Then follow: https://docs.drupalcommerce.org/commerce2/developer-guide/orders/customi...

Ideally would be not to replace contrib module template but extend twig block defined within.
Thanks to this you are sure that whenever update comes to contrib template you will not lose new features/updates.

lunk rat’s picture

Thank you @hockey2112 for sharing your approach. Two other approaches that do not require viewfield on the Order item type:

  1. Use {{ order_item|commerce_entity_render('default') }}, and configure fields/labels on the 'Default' view mode on your Manage Display of your Order Item type--or--create a new view mode for Order Item types (at /admin/structure/display-modes/view/add/commerce_order_item) call it "email" and in your twig template, configure your Order Item type's Manage Display to use the view mode, configure the fields on the view mode, then use {{ order_item|commerce_entity_render('email') }} in your commerce-order-receipt.html.twig
  2. If you want to use Views, but don't want to mess with a viewfield, install Twig Tweak so that you can insert
    {{ drupal_view('your_custom_view', 'your_views_display_name', order_entity.getOrderNumber) }}
    

    Your view needs a contextual filter Order ID, which is passed in as order_entity.getOrderNumber

natts’s picture

I'm so glad I finally found this thread!

I just needed one product attribute (with field machine name 'field_message') to be included in the item rows in the e-mail, so I adapted the template like this:

              {% for order_item in order_entity.getItems %}
              <tr>
                <td>
                  {{ order_item.getQuantity|number_format }} x
                </td>
                <td>
                  {{ order_item.label }}
                </td>
                <td>
                  {% if order_item.field_message.value %}
                    {{ order_item.field_message.value }}
                  {% endif %}
                </td>
                <td style="text-align: right;">
                  {{ order_item.getTotalPrice|commerce_price_format }}</span>
                </td>
              </tr>
              {% endfor %}

So if the order_item has a value for field_message, that value goes into a new third table column (if not then the cell is empty), with the fourth column now right-aligned with the total price as before.

And instead of putting this commerce-order-receipt.html.twig file in a new custom module, I just included it in my existing custom theme (in its templates directory), with the following in the THEMENAME.theme file:

/**
 * Implements hook_theme().
 */
function THEMENAME_theme($existing, $type, $theme, $path) {
  return [
    'commerce_order_receipt' => [
      'template' => 'commerce-order-receipt',
      'base hook' => 'commerce_order_receipt',
    ],
  ];
}
tarasiadis’s picture

#9 works very nice to my setup. Thanks

hockey2112’s picture

I just used the method in #10 since I didn't want to go the Viewfield route for a single order item field. Worked great!

ganeshc’s picture

How can I get and print SKU of product (order_item) in twig template?
Also how can I get purchase order number separately? Right now I am getting it in "Payment method" like this: Purchase Order# 654.

hockey2112’s picture

@ganeshc, This worked for me:

{{ order_item.getPurchasedEntity.getSku }}

Does anyone know how I can print the order email value in the order receipt template? In other words, I want the customer's email address to appear in the template/email receipt.

Thanks

pankaj1390’s picture

Project: Commerce Core » Commerce
Version: 8.x-2.13 » 7.x-2.0
Component: Order » Code
Issue tags: +commerce

How we can user custm field with order_item order_entity?

hockey2112’s picture

@lunk rat (re: #9)... I am trying to include a Viewfield from the Order type (not the Order Item type). I added this code to my email template file after installing Twig Tweak:

{{ drupal_view('league_registration_webform_data', 'block_1', order_entity.getOrderNumber) }}

Unfortunately, it had no effect; nothing was displayed. Any ideas on how I can make that work?

----------------------------EDIT------------------------

I got it to work! I had to use "getOrderId" instead of "getOrderNumber", as shown below:

{{ drupal_view('league_registration_webform_data', 'block_1', order_entity.getOrderId) }}

norwegian.blue’s picture

@hockey2112
I printed the recipient email with:

{{ ' email address: @emailaddr'|t({'@emailaddr': order_entity.mail.value}) }}

I needed a custom field from the product variation type (field_displayed_title)

{{ order_item.getPurchasedEntity.field_displayed_title.value }}

worked in may case

terminator727’s picture

how i can make the same with the product image? my product image is a "field_image", i created a news display "Image" like the SKU display and this on my template: "order_item.getPurchasedEntity.getImage" but doesn't load any product images.. wrong way?

thalemn’s picture

To add product images, my solution was to create a block of the commerce_order_item_table view, and add the block to commerce-order-receipt twig template using twig tweak. The tricky part was passing the order item ids arguments to the block. Here's the code in the twig email template that worked for me:

{% set termids = [] %}
                  {% for order_item in order_entity.getItems %}
                    {% set term = order_item.id %}
                    {% set termids = termids|merge([term]) %}
                {% endfor %}
                {% set termids = termids|join('+') %}
                {# {{ termids }} #}
                {{ drupal_view('commerce_order_item_table', 'block_1', termids) }}

You can uncomment the termids to see that it's working as expected.

Hope this helps!

Drupal_hippie’s picture

@thalemn
But there are no image fields to add in this block..

Fields there are as follows:

Order item: Title (Title)
Order item: Unit price (Unit price)
Order item: Quantity (Quantity)
Order item: Total price (Total price)

Available fields are as follows:

Contextual Links Global Display fields in a contextual links menu.
Update Custom text
Custom text Global Provide custom text or link.
Update Dropbutton
Dropbutton Global Display fields in a dropbutton.
Update View result counter
View result counter Global Displays the actual position of the view result
Update Adjustments
Adjustments Order item
Update Adjustments (adjustments:delta)
Adjustments (adjustments:delta) Order item
Update Changed
Changed Order item The time when the order item was last edited.
Update Created
Created Order item The time when the order item was created.
Update Data
Data Order item A serialized array of additional data.
Update ID
ID Order item
Update Locked
Locked Order item
Update Order
Order Order item The parent order.
Update Order item type
Order item type Order item
Update Overridden unit price
Overridden unit price Order item Whether the unit price is overridden.
Update Purchased entity
Purchased entity Order item The purchased entity.
Update Quantity
Quantity Order item The number of purchased units.
Update Quantity text field
Quantity text field Order item Adds a text field for editing the quantity.
Update Remove button
Remove button Order item Adds a button for removing the order item.
Update Rendered entity
Rendered entity Order item Renders an entity in a view mode.
Update Title
Title Order item The order item title.
Update Total price
Total price Order item The total price of the order item.
Update Total price (currency_code)
Total price (currency_code) Order item The total price of the order item.
Update Unit price
Unit price Order item The price of a single unit.
Update Unit price (currency_code)
Unit price (currency_code) Order item The price of a single unit.
Update Uses legacy adjustments
Uses legacy adjustments Order item
Update UUID
UUID Order item

__________________
Figured it out, I need to add additional relationship to the view.

thalemn’s picture

I added product variation relationship to my view to get the product variation images.

Here's the export of my view:

uuid: 51f58522-070e-4508-827b-8e0f855a1370
langcode: en
status: true
dependencies:
  config:
    - field.storage.commerce_order_item.field_date_new
    - field.storage.commerce_order_item.field_print_queue
    - field.storage.commerce_order_item.field_state
    - field.storage.commerce_product.field_images
    - field.storage.commerce_product_variation.field_images
    - image.style.product_thumbnail
    - image.style.thumbnail
  module:
    - commerce_order
    - commerce_price
    - commerce_product
    - image
    - options
_core:
  default_config_hash: UE_BIm69Zww4UFa4pD5Qiu7XY-rGJGrGYDJHUSZKupw
id: commerce_order_item_table
label: 'Order items'
module: views
description: 'Display a set of order items in a table.'
tag: ''
base_table: commerce_order_item
base_field: order_item_id
display:
  default:
    id: default
    display_title: Master
    display_plugin: default
    position: 0
    display_options:
      fields:
        field_state:
          id: field_state
          table: commerce_order_item__field_state
          field: field_state
          relationship: none
          group_type: group
          admin_label: ''
          plugin_id: field
          label: State
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: list_default
          settings: {  }
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        field_date_new:
          id: field_date_new
          table: commerce_order_item__field_date_new
          field: field_date_new
          relationship: none
          group_type: group
          admin_label: ''
          plugin_id: field
          label: 'Date New'
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: timestamp
          settings:
            date_format: medium
            custom_date_format: ''
            timezone: ''
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        field_print_queue:
          id: field_print_queue
          table: commerce_order_item__field_print_queue
          field: field_print_queue
          relationship: none
          group_type: group
          admin_label: ''
          plugin_id: field
          label: 'Print Queue'
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: target_id
          type: entity_reference_label
          settings:
            link: false
          group_column: target_id
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        field_images:
          id: field_images
          table: commerce_product__field_images
          field: field_images
          relationship: product_id
          group_type: group
          admin_label: ''
          plugin_id: field
          label: Images
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: target_id
          type: image
          settings:
            image_link: ''
            image_style: thumbnail
            image_loading:
              attribute: lazy
          group_column: ''
          group_columns: {  }
          group_rows: true
          delta_limit: 1
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        field_images_1:
          id: field_images_1
          table: commerce_product_variation__field_images
          field: field_images
          relationship: commerce_product_variation
          group_type: group
          admin_label: ''
          plugin_id: field
          label: Images
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: target_id
          type: image
          settings:
            image_link: ''
            image_style: thumbnail
            image_loading:
              attribute: lazy
          group_column: ''
          group_columns: {  }
          group_rows: true
          delta_limit: 1
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        nothing:
          id: nothing
          table: views
          field: nothing
          relationship: none
          group_type: group
          admin_label: Images
          plugin_id: custom
          label: Image
          exclude: false
          alter:
            alter_text: true
            text: '{{ field_images }} {{ field_images_1 }}'
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: false
        title:
          id: title
          table: commerce_order_item
          field: title
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: null
          entity_field: title
          plugin_id: field
          label: Items
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: string
          settings: {  }
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        unit_price__number:
          id: unit_price__number
          table: commerce_order_item
          field: unit_price__number
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: commerce_order_item
          entity_field: unit_price
          plugin_id: field
          label: 'Unit price'
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: number
          type: commerce_price_default
          settings:
            strip_trailing_zeroes: false
            currency_display: symbol
          group_column: ''
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        quantity:
          id: quantity
          table: commerce_order_item
          field: quantity
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: commerce_order_item
          entity_field: quantity
          plugin_id: field
          label: Quantity
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: number_decimal
          settings:
            thousand_separator: ''
            decimal_separator: .
            scale: 0
            prefix_suffix: true
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        total_price__number:
          id: total_price__number
          table: commerce_order_item
          field: total_price__number
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: commerce_order_item
          entity_field: total_price
          plugin_id: field
          label: 'Total price'
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: number
          type: commerce_price_default
          settings:
            strip_trailing_zeroes: false
            currency_display: symbol
          group_column: ''
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        order_item_id:
          id: order_item_id
          table: commerce_order_item
          field: order_item_id
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: commerce_order_item
          entity_field: order_item_id
          plugin_id: field
          label: ID
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: number_integer
          settings:
            thousand_separator: ''
            prefix_suffix: true
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
      pager:
        type: none
        options:
          offset: 0
      exposed_form:
        type: basic
        options:
          submit_button: Apply
          reset_button: false
          reset_button_label: Reset
          exposed_sorts_label: 'Sort by'
          expose_sort_order: true
          sort_asc_label: Asc
          sort_desc_label: Desc
      access:
        type: none
        options: {  }
      cache:
        type: tag
        options: {  }
      empty:
        area_text_custom:
          id: area_text_custom
          table: views
          field: area_text_custom
          relationship: none
          group_type: group
          admin_label: ''
          plugin_id: text_custom
          empty: true
          content: 'There are no order items yet.'
          tokenize: false
      sorts: {  }
      arguments:
        order_item_id:
          id: order_item_id
          table: commerce_order_item
          field: order_item_id
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: commerce_order_item
          entity_field: order_item_id
          plugin_id: numeric
          default_action: empty
          exception:
            value: all
            title_enable: false
            title: All
          title_enable: false
          title: ''
          default_argument_type: fixed
          default_argument_options:
            argument: ''
          default_argument_skip_url: false
          summary_options:
            base_path: ''
            count: true
            override: false
            items_per_page: 25
          summary:
            sort_order: asc
            number_of_records: 0
            format: default_summary
          specify_validation: false
          validate:
            type: none
            fail: 'not found'
          validate_options: {  }
          break_phrase: true
          not: false
      filters: {  }
      style:
        type: table
        options:
          grouping: {  }
          row_class: ''
          default_row_class: true
          columns:
            field_state: field_state
            field_date_new: field_date_new
            field_print_queue: field_print_queue
            field_images: field_images
            field_images_1: field_images_1
            nothing: nothing
            title: title
            unit_price__number: unit_price__number
            quantity: quantity
            total_price__number: total_price__number
          default: '-1'
          info:
            field_state:
              sortable: false
              default_sort_order: asc
              align: ''
              separator: ''
              empty_column: false
              responsive: ''
            field_date_new:
              sortable: false
              default_sort_order: asc
              align: ''
              separator: ''
              empty_column: false
              responsive: ''
            field_print_queue:
              sortable: false
              default_sort_order: asc
              align: ''
              separator: ''
              empty_column: false
              responsive: ''
            field_images:
              align: ''
              separator: ''
              empty_column: true
              responsive: ''
            field_images_1:
              align: ''
              separator: ''
              empty_column: true
              responsive: ''
            nothing:
              align: views-align-center
              separator: ''
              empty_column: false
              responsive: ''
            title:
              sortable: false
              default_sort_order: asc
              align: views-align-left
              separator: ''
              empty_column: false
              responsive: ''
            unit_price__number:
              sortable: false
              default_sort_order: asc
              align: views-align-center
              separator: ''
              empty_column: false
              responsive: ''
            quantity:
              sortable: false
              default_sort_order: asc
              align: views-align-center
              separator: ''
              empty_column: false
              responsive: ''
            total_price__number:
              sortable: false
              default_sort_order: asc
              align: views-align-center
              separator: ''
              empty_column: false
              responsive: ''
          override: true
          sticky: false
          summary: ''
          empty_table: true
          caption: ''
          description: ''
      row:
        type: fields
        options:
          default_field_elements: true
          inline: {  }
          separator: ''
          hide_empty: false
      query:
        type: views_query
        options:
          query_comment: ''
          disable_sql_rewrite: false
          distinct: false
          replica: false
          query_tags: {  }
      relationships:
        commerce_product_variation:
          id: commerce_product_variation
          table: commerce_order_item
          field: commerce_product_variation
          relationship: none
          group_type: group
          admin_label: 'Product variation'
          entity_type: commerce_order_item
          plugin_id: standard
          required: true
        product_id:
          id: product_id
          table: commerce_product_variation_field_data
          field: product_id
          relationship: commerce_product_variation
          group_type: group
          admin_label: Product
          entity_type: commerce_product_variation
          entity_field: product_id
          plugin_id: standard
          required: true
      css_class: user-order-table
      header: {  }
      footer: {  }
      display_extenders: {  }
    cache_metadata:
      max-age: -1
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
        - url
      tags:
        - 'config:field.storage.commerce_order_item.field_date_new'
        - 'config:field.storage.commerce_order_item.field_print_queue'
        - 'config:field.storage.commerce_order_item.field_state'
        - 'config:field.storage.commerce_product.field_images'
        - 'config:field.storage.commerce_product_variation.field_images'
  block_1:
    id: block_1
    display_title: Block
    display_plugin: block
    position: 1
    display_options:
      fields:
        field_images:
          id: field_images
          table: commerce_product__field_images
          field: field_images
          relationship: product_id
          group_type: group
          admin_label: ''
          plugin_id: field
          label: Images
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: target_id
          type: image
          settings:
            image_link: ''
            image_style: product_thumbnail
            image_loading:
              attribute: eager
          group_column: ''
          group_columns: {  }
          group_rows: true
          delta_limit: 1
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        field_images_1:
          id: field_images_1
          table: commerce_product_variation__field_images
          field: field_images
          relationship: commerce_product_variation
          group_type: group
          admin_label: ''
          plugin_id: field
          label: Images
          exclude: true
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: true
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: target_id
          type: image
          settings:
            image_link: ''
            image_style: product_thumbnail
            image_loading:
              attribute: eager
          group_column: ''
          group_columns: {  }
          group_rows: true
          delta_limit: 1
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        nothing:
          id: nothing
          table: views
          field: nothing
          relationship: none
          group_type: group
          admin_label: Images
          plugin_id: custom
          label: Image
          exclude: false
          alter:
            alter_text: true
            text: '{{ field_images }} {{ field_images_1 }}'
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: false
        title:
          id: title
          table: commerce_order_item
          field: title
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: null
          entity_field: title
          plugin_id: field
          label: Items
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: string
          settings: {  }
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        quantity:
          id: quantity
          table: commerce_order_item
          field: quantity
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: commerce_order_item
          entity_field: quantity
          plugin_id: field
          label: Qty
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: value
          type: number_decimal
          settings:
            thousand_separator: ''
            decimal_separator: .
            scale: 0
            prefix_suffix: true
          group_column: value
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        unit_price__number:
          id: unit_price__number
          table: commerce_order_item
          field: unit_price__number
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: commerce_order_item
          entity_field: unit_price
          plugin_id: field
          label: Each
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: number
          type: commerce_price_default
          settings:
            strip_trailing_zeroes: false
            currency_display: symbol
          group_column: ''
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
        total_price__number:
          id: total_price__number
          table: commerce_order_item
          field: total_price__number
          relationship: none
          group_type: group
          admin_label: ''
          entity_type: commerce_order_item
          entity_field: total_price
          plugin_id: field
          label: Total
          exclude: false
          alter:
            alter_text: false
            text: ''
            make_link: false
            path: ''
            absolute: false
            external: false
            replace_spaces: false
            path_case: none
            trim_whitespace: false
            alt: ''
            rel: ''
            link_class: ''
            prefix: ''
            suffix: ''
            target: ''
            nl2br: false
            max_length: 0
            word_boundary: true
            ellipsis: true
            more_link: false
            more_link_text: ''
            more_link_path: ''
            strip_tags: false
            trim: false
            preserve_tags: ''
            html: false
          element_type: ''
          element_class: ''
          element_label_type: ''
          element_label_class: ''
          element_label_colon: false
          element_wrapper_type: ''
          element_wrapper_class: ''
          element_default_classes: true
          empty: ''
          hide_empty: false
          empty_zero: false
          hide_alter_empty: true
          click_sort_column: number
          type: commerce_price_default
          settings:
            strip_trailing_zeroes: false
            currency_display: symbol
          group_column: ''
          group_columns: {  }
          group_rows: true
          delta_limit: 0
          delta_offset: 0
          delta_reversed: false
          delta_first_last: false
          multi_type: separator
          separator: ', '
          field_api_classes: false
      empty: {  }
      defaults:
        empty: false
        fields: false
        footer: false
      footer: {  }
      display_extenders: {  }
    cache_metadata:
      max-age: -1
      contexts:
        - 'languages:language_content'
        - 'languages:language_interface'
        - url
      tags:
        - 'config:field.storage.commerce_product.field_images'
        - 'config:field.storage.commerce_product_variation.field_images'