Context variables
Available context variables in your template
The following variables are available in the template:
Shipment
The shipment (also called order) the template is used for.
Can be accessed via the shipment
variable.
Attributes
destinationAddress
AddressdestinationCompany
StringdestinationName
StringinvoiceNumber
StringshipmentItems
list[ShipmentItem]
Accumulated Fields
For the total price, you can use the total_price filter.
For the total weight, you can use the total_weight filter.
Shipment Item
Details about the items included in the shipment.
Can be accessed via the shipment.shipmentItems
variable.
Attributes
amount
IntegercustomsTariffNumber
Stringprice
PriceproductName
Stringsku
Stringweight
Float
Filters
You can use the format_price filter to format the price.
You can use the format_weight filter to format the weight.
Sender Address
The address of the warehouse from where the shipment will be sent.
Can be accessed via the senderAddress
variable
Read Address for more details about the attributes.
Address
Holds address information such as street, house number etc.
Attributes
country
Countrylocality
StringpostalCode
Stringthoroughfare
StringsubThoroughfare
StringsubSubThoroughfare
String
Formatting Address
For street, house number and addition use the
format_street
filter.
Updated about 1 year ago