Hey.
How can I make sure an email still delivers to a user even if a liquid or variable used in the email is empty or non existent for the recipient?
Like I would want the variable/liquid to be empty and the email should still get sent.
Hey.
How can I make sure an email still delivers to a user even if a liquid or variable used in the email is empty or non existent for the recipient?
Like I would want the variable/liquid to be empty and the email should still get sent.
Hey Gift,
the easiest way to do this is to use an if-statment. You can just leave the {% else %} part blank. Here is an example for a salutation:
Hello{% if customer.first_name %} {{customer.first_name}}{% else %}{% endif %},
Output first_name exisits:
Hello Felix,
Output first_name does not exist:
Hello,
Hope that helps,
Felix
Ouuh. I’ll try this! Thank you very much
No account yet? Create an account
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.