Order confirmation what's the best way to remove the shipping line

Solved
Grant-Senior
Excursionist
36 3 5

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

order-conirmation-shipping.jpg

0 Likes
alexmarse
Shopify Partner
19 4 9

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!

Alex Marse | Shopify Enthusiasts
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!
0 Likes
Grant-Senior
Excursionist
36 3 5

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 %}

 

alexmarse
Shopify Partner
19 4 9

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!

Alex Marse | Shopify Enthusiasts
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!
0 Likes
Grant-Senior
Excursionist
36 3 5

Yes, just tested it and it works great. Thanks Alex!

alexmarse
Shopify Partner
19 4 9

Excellent, I'm glad to hear that it worked out! Cheers!

Alex Marse | Shopify Enthusiasts
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!
0 Likes
EEAA
New Member
1 0 0

This did not work for me. Can you confirm this still works?

0 Likes