What are the Liquid variables to access the tips for an order?

Solved
Highlighted
New Member
2 1 1

The new tipping feature to let customers leave a tip in the checkout of our online shop (https://help.shopify.com/en/manual/checkout-settings/tips) is great!

Trinkgeld.png

 

However, I cannot find how to access this tipping information afterwards. I looked in the Liquid reference: https://shopify.dev/docs/themes/liquid/reference/objects/ but came up empty handed. I would like to reference it in our invoices that we create using the Order Printer app (https://apps.shopify.com/order-printer). 

 

Who can help here? 

 

 

0 Likes
Highlighted
New Member
2 1 1

This is an accepted solution.

Update: I found out that the tip is handled as a line item in the order. 

So I am currently filtering for it like this:

{% for line_item in line_items %}
     {% if line_item.title == "Tip" %}
          do something with the tip
     {% endif %}
{% endfor %}

This is quite counterintuitive, since I would expect the tip to be handled as an order attribute or perhaps transaction.

Hope it helps for others!

1 Like