Shopify Flow is an ecommerce automation platform that enables you to automate tasks and processes within your store and across your apps.
Hi everyone!
We are using Flow to send order creation triggered internal emails with certain data from the order and its included line items. For some orders those variables can be empty. So my question is how to hide the entire variable output within the mail when no data is available.
Example:
Order summary: {{order.name}} <br>
{% for lineItems_item in order.lineItems %}
Quantity: {{lineItems_item.quantity}} <br>
Product: {{lineItems_item.title}} <br>
Variant: {{lineItems_item.variantTitle}} <br>
{% endfor %}
Not all products have variants so I'd like to hide the entire line "Variant: ..." if no data exists.
Help would be highly appreciated!
Kindest regards
Armin
Solved! Go to the solution
This is an accepted solution.
Hi RennWelten,
You can try wrapping that line in a `nil` check on the `variant` field, like:
{% if lineItems_item.variant != nil %}
Variant: {{lineItems_item.variantTitle}} <br>
{% endif %}
Hope that helps!
This is an accepted solution.
Hi RennWelten,
You can try wrapping that line in a `nil` check on the `variant` field, like:
{% if lineItems_item.variant != nil %}
Variant: {{lineItems_item.variantTitle}} <br>
{% endif %}
Hope that helps!
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024