Hi. I have a site that only deals in digital products so there is no shipping involved and the client wants the line referring to shipping removed from the Order Confirmation mail sent out (see attached). Is there a way to do this other than adjusting the code of the notification template?
Cheers
Grant
Solved! Go to the solution
This is an accepted solution.
Hey Grant!
To do this you'll need to edit the Order Confirmation email notification template, which you can find at Settings –> Notifications.
You'll want to find the following bit of code...
<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>Shipping</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ shipping_price | money }}</strong>
</td>
</tr>
Then wrap it in an if statement which will only put the Shipping line in the email if any of the items actually require shipping, like so...
{% if requires_shipping %}
<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>Shipping</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ shipping_price | money }}</strong>
</td>
</tr>
{% endif %}
Click save, and that should do it!
Lemme know how that goes, Grant!
Alex Marse | Shopify Enthusiast
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it Accept as Solution to help others locate the answer!
Your Like and Accept as Solution are much appreciated!
Hi Alex, thanks for your help. That code is already in an else statement, so doing what you suggest makes the following. Is that correct?
{% else %}
{% if requires_shipping %}
<tr class="subtotal-line">
<td class="subtotal-line__title">
<p>
<span>Shipping</span>
</p>
</td>
<td class="subtotal-line__value">
<strong>{{ shipping_price | money }}</strong>
</td>
</tr>
{% endif %}
{% endif %}
Yep I believe that'll do the trick! You could always test it out with a fake order as well to be certain.
Alex Marse | Shopify Enthusiast
Was my reply helpful? Click Like to let me know!
Was your question answered? Mark it Accept as Solution to help others locate the answer!
Your Like and Accept as Solution are much appreciated!
User | Count |
---|---|
22 | |
12 | |
9 | |
7 | |
7 |