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!
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?
Solved! Go to the solution
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!
Yes, it still works for me.
I activated tipping via the Settings menu, Checkout options. And built the invoice template in the Order Printer app.
{% for line_item in line_items %}
{% if line_item.title == "Tip" %}
<tr>
<td>Tip:</td>
<td>{{ line_item.price | money }}</td>
</tr>
{% endif %}
{% endfor %}
User | Count |
---|---|
28 | |
17 | |
15 | |
12 | |
10 |