How can I combine all tax lines into a single sales tax display?

JeffSpurlock
Shopify Partner
9 0 12

Hello,

 

I've had so many customers complain about the breakdown of sales tax lines, questioning why they're paying taxes for municipalities they don't live in, when its because of our physical location we're shipping from. 

 

I'd like to combine all the tax lines into a single Sales Tax display in our email confirmation. I've changed the default notification to the following: 

 

 

 

        {% assign t = 0 %}
        {% for line in tax_lines %}
          {% t = line.price + t %}
        {% endfor %}
          
<tr class="subtotal-line">
  <td class="subtotal-line__title">
    <p>
      <span style="color:#1b4388;">Sales Tax</span>
    </p>
  </td>
  <td class="subtotal-line__value">
    <strong style="color:#1b4388;">{{ t | money }}</strong>
  </td>
</tr>

 

 

 

 

But i'm getting the error "unknown tag 't'" when trying to save. Clearly i'm assigning a variable t, so i'm not sure why its not recognizing this variable. Any tips here?

Reply 1 (1)

ggus03
Shopify Partner
1 0 0

I use the old tag {{ tax_price | money }} which displays as the tax total.

 

<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>Taxes</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ tax_price | money }}</strong>
</td>
</tr>