Looking for liquid code for digital products not requiring shipping in Confirmation Email

Topic summary

A user seeks Liquid code to customize Shopify’s confirmation email for orders containing digital products (delivered via BookFunnel) that don’t require shipping. The store sells both digital and physical items, and they want conditional messaging based on shipping requirements.

Solution provided:
Another participant shares code snippets using the requires_shipping variable:

  • {% if requires_shipping == false %} for digital-only orders
  • {% unless requires_shipping %} as an alternative approach

They also reference Shopify’s documentation on conditional tags, operators, and the line_item.requires_shipping object.

Implementation:
The code should be added at the top of the Confirmation Email template (Settings > Notifications). A screenshot was shared showing the exact placement.

Outcome:
Multiple users confirmed the solution works successfully. The thread appears resolved with participants expressing gratitude for the working implementation.

Summarized with AI on November 15. AI used: claude-sonnet-4-5-20250929.

Hello - Looking the correct liquid code to add to the Confirmation Email. Most of the store’s products are digital products (and are delivered through Book Funnel not through Shopify Digital Products) but we do have some physical as well. I’m looking to add code so that I can put in a specific message for all orders that either ONLY contain E-books or contain some E-books and some physical that will be shipped. In the default template I only see code regarding if it requires shipping. What can I add below for something if it doesn’t require shipping?

Thanks for the help! I’m awful at thinking the way you need to for code!

{% capture email_title %}Thank you for your purchase! {% endcapture %}
{% capture email_body %}
{% if requires_shipping %}
{% case delivery_method %}
{% when ‘pick-up’ %}
You’ll receive an email when your order is ready for pickup.
{% when ‘local’ %}
Hi {{ customer.first_name }}, we’re getting your order ready for delivery.
{% else %}
Hi {{ customer.first_name }}, we’re getting your order ready to be shipped. We will notify you when it has been sent.
{% endcase %}
{% if delivery_instructions != blank %}

Delivery information: {{ delivery_instructions }}

{% endif %} {% if consolidated_estimated_delivery_time %}

Estimated delivery {{ consolidated_estimated_delivery_time }}

{% endif %} {% endif %} {% endcapture %}
2 Likes

Reference

https://shopify.dev/api/liquid/tags/conditional-tags

https://shopify.dev/api/liquid/basics#operators

https://shopify.dev/api/liquid/objects/line_item#line_item-requires_shipping

{% if requires_shipping == false %}
 Digital only message
{% endif %}

Or

{% unless requires_shipping %}
 Digital only message
{% endunless %}

Or

{% if requires_shipping %}
{% else %}
 Digital only message
{% endif %}

It can be easier by formatting code like it’s a text poem to improve it’s readability being generous with indents and line breaks.

Either using a code editor, or in the case of a forum the code sample button to also have code highlighting.

1 Like

Thanks for the quick Response @PaulNewton ! That did the trick!

1 Like

I have the exact same challenge. Would love to apply your solution but im just too green to have any idea how and where to do this. Do you have any possibility to screen record where you insert this code?

Thanks a ton !

/Lars

I feel you Lars. I added it right at the top of the code for the “Confirmation Email” (Settings > Notifications)

Hope this screenshot helps you figure it out.

Thanks a lot Kdotti. Even I understood it now, and it seems to be working as well. Thank you !

/Lars