Show extra fields in an order

Add a new field to order comments at store checkout

// Initialize order fields 
ec.order = ec.order || {};
ec.order.extraFields = ec.order.extraFields || {};

// Add new text field to order comments section at checkout
ec.order.extraFields.how_you_found_us = {
    'title': 'How did you find us?',
    'textPlaceholder': 'Describe here please!',
    'type': 'text',
    'required': false,
    'checkoutDisplaySection': 'payment_details', // show new field in order comments block
    'orderDetailsDisplaySection': 'order_comments' // show saved data in order comments block in order details to merchant and customer


You can show your saved extra field title and value in order details. It will be displayed to merchant in store control panel.

It is possible to customize the position of this information with orderDetailsDisplaySection field.

Possible values for it include:

  • shipping_info
  • billing_info
  • customer_info
  • order_comments

Check a basic example on the right.

Extra field display requirements

Extra fields will only be shown in order details to customer and store admin if these conditions are met:

  • title is not empty
  • value is not empty
  • orderDetailsDisplaySection contains supported value: shipping_info, billing_info, customer_info, order_comments

Order extra fields in invoices and emails

Show all order extra fields set to be visible in order details (title and orderDisplaySection is specified)

<#list order.extraFields as extraField>
    <#if extraField.title?has_content && extraField.orderDisplaySection?has_content>
        ${extraField.title}: ${extraField.value}

Check out these articles in the Ecwid Help Center to learn how to show all or partial details of order extra fields:

We use cookies and similar technologies to remember your preferences, measure effectiveness of our campaigns, and analyze depersonalized data to improve performance of our site. By choosing «Accept», you consent to the use of cookies.