Use to display different content if line item has a subscription. It can be used to show a link to your customer accounts, where the customer can manage their subscription.
Copy
Ask AI
{% assign has_subscription = false %}{% for line_item in line_items %} {% if line_item.selling_plan_allocation %} {% assign has_subscription = true %} {% break %} {% endif %}{% endfor %}{% if has_subscription %} <p>You’ve started a subscription. <a href="{{ shop.url }}/account">Manage your subscription</a></p>{% else %} <p>Thank you for your order</p>{% endif %}
Use to display different content if it’s a recurring order
Copy
Ask AI
{% if order.source_name == 'subscription_contract' %} <p>Thank you for your subscription order</p>{% else %} <p>Thank you for your order</p>{% endif %}
Use can also use it in the email subject
Copy
Ask AI
{%- if order.source_name == 'subscription_contract' -%} Thanks for your subscription order, {{ customer.first_name }} {%- else -%} Thanks for your order, {{ customer.first_name }} {%- endif -%}
You can incorporate this into Shopify’s default notifications to display the dates in the product list if your template isn’t outputting the line item properties.