User Tools

Site Tools



For more details see the Order Attributes extension page.

Order Attributes for Magento 2

Add an unlimited number of extra fields to your checkout page to easily collect and process additional order related data. Display all created order attributes on a handy backend grid to keep necessary information at hand.

  • Create order attributes of different types
  • Use flexible conditions for attribute fields display
  • Show additional attributes info on the order grid
  • Add custom attributes to emails and PDF documents
  • Show extra attributes depending on a selected shipping method

Due to flexible settings and intuitive interface, the Order Attributes for Magento 2 extension will help you easily fine tune the checkout page according to your requirements. Create as many additional order attributes as you need. Use various field input types and quickly process collected data on the backend.

General Settings

To configure general extension settings please go to StoresConfiguration Order Attributes.

Checkout Settings

Display Attribute Values in the Progress Sidebar - Set the option to ‘Yes’ if you want to display custom order attributes on the checkout progress bar.

Hide Empty Values in the Progress Sidebar - Enable the option to hide attributes with empty values on the checkout progress sidebar.

PDF Documents

Decide whether to include order attributes in PDF documents (invoices and shipping slips).

Invoices and Shipments

Specify where do display order attributes (invoices/shipment grid and view).

New Attribute Creation

To manage order attributes please go to SalesManage Order Attributes.

All created attributes will be displayed in a special grid. Click the 'Add New Order Attribute' button to create an attribute.

Attribute Properties

Default Label/ Attribute Code - Specify an attribute label and a code. The code will be used only for internal needs.

Store View - Select the store view for which the attribute will be available.

Customer Groups - Select customer groups for which the attribute will be shown.

Catalog Input Type for Store Owner - It’s possible to choose among various input types depending on your specific needs. You can select one of the following input types:

  • Text Field
  • Text Area
  • Date
  • Date With Time
  • Yes/No
  • Dropdown
  • Checkbox Group
  • Radiobuttons

For all input types except Dropdown, Checkbox Group, and Radiobuttons you can define the default value in the corresponding field.

For the Dropdown, Checkbox Group, and Radiobuttons input types you can add multiple options in the Manage Label/Options tab.

NOTE: after the attribute code and the catalog input type are specified and saved they can’t be changed.

Values Required - If the option is set to ‘yes’ customers won’t be able to leave this attribute field blank while getting registered.

Default Value - Specify the value which will be preselected by default if necessary.

Visible on frontend/backend - Choose where the attribute will be displayed.

Tooltip - fill in the text here to help customers understand the necessity of this order attribute.

Attribute Configuration

Show On Checkout Step - Specify at which checkout step the attribute should be displayed:

  • Shipping
  • Reviews & Payments

Display Sorting Order - Set the sorting order for attribute display on the frontend.

Save Entered Value For Future Checkout - If you set the option to ‘Yes’, registered customers will need to fill in the field only once, after that the field will be auto-populated (with the possibility to edit).

Automatically Apply Default Value -If set to `Yes`, the default value will be automatically applied to each order if the attribute value is not specified by a customer or is not visible on the frontend.

You can specify whether to include each particular order attribute in PDF documents and HTML printouts. NOTE: The corresponding configuration settings need to be turned to ‘Yes’ to make the option work.

Manage Labels / Options

Default Store View - Specify attribute title that will be visible on the frontend.

Manage Options - Create as many attribute values as you need, specify the value that will be preselected by default.

Use the Unselect All link to remove the default choice. Also, you can drag-and-drop the variants to prioritize them according to your needs.

Attribute Conditions

Shipping Methods - Specify particular shipping methods to show the extra attribute only to those customers who choose specified methods.

Attribute Relations

To manage attribute relations please go to SalesOrder AttributesManage Attribute Relations.

Attribute Relations Grid

Attribute Relation - On the 'Attribute Relation' grid you'll see all created relations. It's possible to add an unlimited number of new relations and manage already created once.

Create Attribute Relations

Relation Name - Specify a relation name that will be used for internal needs only.

Parent Attribute - Choose the attribute that will be a parent.

Attribute Options - Select attribute values that will trigger the display of dependent attributes.

Dependent Attributes - Specify which attributes will be dependent. These attributes will be displayed only if a customer selects one of the specified values of a parent attribute.

According to our relations settings the 'Join us' attribute is shown only when the 'Facebook' value in the parent attribute is chosen.

Please, mind that you can create relations only for the following types of attributes:
  • Dropdown
  • Checkbox Group
  • Radio Buttons

Attributes Display in the Admin Panel

Order Grid

Show all custom order attributes on the Orders Grid.

Order View Page

Additional order attributes data will be displayed on the Order info page.

Click 'Edit' to modify custom attributes from the admin panel.

HTML Printouts

Include custom attributes in HTML and PDF printouts.

Attributes on the Registration and Checkout Pages

See the example of custom order attributes with different input types (text fields, dropdowns, radio buttons, multiple checkboxes).

Display a handy calendar for the ‘Date’ and ‘Date and Time’ input types. The calendar appears once a customer clicks on the attribute field.

Also, the customers will be provided with the selected attributes on the checkout page.

Include Order Attributes in E-mail

The extension is compatible with Order Status for Magento 2.

You can include order attributes in your business e-mails, by inserting the special variable in your messages. Insert an order attribute into the code:

If order attribute is comment, for instance, insert the following in your letter:

{{var order.getComment()}}


{{var order.getData('comment')}}

Compatibility with REST/SOAP API

To get order attributes using API please look through these steps and methods:

  • Order attributes should have “Include Into API” = Yes
  • To get order data you should be authorized as admin and have the API Authorization token
  • Use on of the methods below:
GET /V1/orders/
GET /V1/orders
amasty_order_attributes will be in amasty_order_attributes array and contains the array of the attributes. 
"attribute_code" - contains system attribute code;
"label" - contains attribute Title (can have specialchars)
"value" - contains attribute system value, like option ID or text
"value_output" - parsed value of attribute

For example:

[entity_id] => 1
[extension_attributes] => stdClass Object
[amasty_order_attributes] => Array
[0] => stdClass Object
[attribute_code] => amasty_code
[label] => Some Amasty
[value] => 215
[value_output] => amasty_option3


PUT /V1/orders/create
POST /V1/orders/
amasty_order_attributes should be in "extension_attributes" array and contain array of the attributes
"attribute_code" - contains system attribute code;
"value" - contains attribute system value, like option ID or text

For example:

"entity" => [
"entity_id" => 3,
"increment_id" => "000000004",
"store_id" => 1,
"extension_attributes" => [
"amasty_order_attributes" => [
"attribute_code" => "amasty_options",
"value" => value_id
"attribute_code" => "amasty_text",
"value" => 'test'

Find out how to install the Order Attributes extension for Magento 2 via Composer.

Rate the user guide
 stars  from 5 votes (Details)
magento_2/order_attributes.txt · Last modified: 2018/04/06 13:45 by prakapovich