How do I separate taxes on two different lines in the Shopify Order printer

Topic summary

A user is trying to display multiple tax rates on separate lines in a Shopify Order Printer template. Currently, their code outputs all taxes (GST 5.0% and QST 9.975%) on a single line within one table cell.

Current Issue:

  • All tax information appears concatenated in one row
  • Example: both GST and QST taxes display together instead of on individual lines

Solution Provided:
Move the <tr> and <td> HTML table elements inside the {% for tax_line in order.tax_lines %} loop rather than outside it. This creates a new table row for each tax line iteration.

Key Code Change:

  • Wrap each tax line’s output in its own <tr><td> structure within the loop
  • Add | round: 3 filter to the rate calculation for cleaner percentage display

The discussion appears resolved with a working code solution provided.

Summarized with AI on October 27. AI used: claude-sonnet-4-5-20250929.

I’ve had much trouble finding how to add separate taxes rate to my order printer template.

I have adding this code to achieve this which is great but it could be better.

QUESTION : How to separate the items to different lines

Ex :

GST 5.0% : $28.77

QST 9.975% : $57.43

THE CURRENT CODE

{% for tax_line in order.tax_lines %} Tax ({{ tax_line.title }} {{ tax_line.rate | times: 100 }}%): {{ tax_line.price | money }} {% endfor %}

thanks to all for your help

Hey! @SardinesStudio ,

To display each tax line on a separate row in your Order Printer template (instead of all tax lines on a single line), you just need to move the and elements inside the {% for %} loop. Here’s how to update your code:

{% for tax_line in order.tax_lines %}

  
    {{ tax_line.title }} {{ tax_line.rate | times: 100 | round: 3 }}% : {{ tax_line.price | money }}
  

{% endfor %}