Context data available in Order Notes
Common Context
Variables
Variable Name | Description |
---|---|
| Translated name of the given order note. E.g. |
| The billing address data of a given order. It contains sub-variables:
Please take a look at the |
| The shipping address data of a given order. It contains sub-variables:
Please take a look at the |
| The company name from the |
| A boolean, indicating whether pickup delivery is activated for the given order |
| Customer number of the person, who created the order |
| The label defined in the Admin Panel: |
| The visibility setting from the Admin Panel: |
| Creation date of the order |
| The whole order object. It contains sub-variables:
Please take a look at the |
| Please take a look at the |
| String representation of the delivery time. It contains either:
|
| The user who requested to create the given order note. It contains sub-variables:
Please take a look at the |
| String representation of the user who requested to create the given order note. It can be either:
depending on the availability of data |
| The total weight of the order in grams |
| Either |
| Either
|
| The subtotal price of the order. It can be either a net or gross price depending on the Admin Panel setting |
| The total cost of post-processings of the given order. It can be either a net or gross price depending on the Admin Panel setting |
| Total print price of the given order. It can be either a net or gross price depending on the Admin Panel setting |
| Total fee value of the given order. It can be either a net or gross price depending on the Admin Panel setting |
| The amount applied to the order to compensate for the minimum order price defined in the service settings. It can be either a net or gross price depending on the Admin Panel setting |
| Voucher discount that was applied to the order. It can be either a net or gross price depending on the Admin Panel setting |
| The shipping price of the order. It can be either a net or gross price depending on the Admin Panel setting |
| The total price object of the order. It contains sub-variables:
|
| The total tax value of the order |
| The tax rate that was applied to the order |
| If the given order was paid via a custom payment method, this variable contains a nicely formatted string: |
| It is the same as {{ payment_metadata.bank_account_and_pw }} |
|
|
| A list of fee objects (fees applied to the order). Every fee object contains sub-variables:
This is how you could use it in a template: {% for fee_obj in fees %}
{{ fee_obj.fee }}
{% endfor %} |
Line Variables
The order_lines
variable is an array of line objects. Every object contains info about a single line. Those are sorted by id
. This is how you would usually use it:
{% for line in order_lines %}
Order Line {{ line.fullName }}
...
{% endfor %}
This is a list of sub-variables:
Variable Name | Description |
---|---|
| Database identifier of the order line (an integer value) |
| An object containing raw dimensions of the order line. It contains the following sub-variables (floating-point values):
Those will be in inches or mm, depending on the unit of the stlfile (note the |
| Full name of the line e.g. |
| Unit of the stlfile. Either |
| Name of the line e.g. |
| An object containing info about the selected offer. It contains sub-variables:
|
| Preferred due date of the order line |
| This object contains various line prices:
All of those prices are either gross or net depending on the Admin Panel setting |
| Ordered quantity of the order line |
| File download link, to download the thumbnail of the order line |
| The same as |
| Weight of the order line (times the ordered quantity) in grams. So if the single ordered piece weights 50 grams, and the |
| Same as |
| Either
|
| Either |
| It contains the part-requirements-form object. This is a very complicated object. Please refer to the |
| The volume of the order line in either
|
| Either |
Order Confirmation
Only the common context
Invoice Note
Only the common context
Delivery Note
Variables
There are two differences to the common context:
There is one additional variable:
show_thumbnails
. This variable is a boolean, and the user sets it in the UI when generating the document. If set, the order line thumbnails should be displayed in the PDFThe
order_lines
variable is not available. There is adelivered_items
variable instead. Please refer to theLine Variables
section below
Line Variables
The order_lines
variable is not available in the Delivery Note; the delivered_items
variable is injected instead. It’s a slightly modified version of the order_lines
. As previously, it’s a list of items, and you should iterate over it:
This is a list of sub-variables for each object:
Variable Name | Description |
---|---|
| It’s the same object as in the common context. The only difference is that the weight attributes are scaled to the quantity of delivered items. E.g. the |
| A number, indicating how many copies of a given line were delivered |