IF statements with custom variables

I would like to achieve this :

If the value of custom variable A is equal to built-in variable B then print the built-in variable on sales invoice .
If the value of custom variable A is NOT equal to built-in variable B then print the value of custom A variable on sales invoice.

How can I do that? Is it feasible through HTML templates?

Thank you in advance!

Hi @aniksnacks,

When you create a new custom template you can already see some conditions.
The template works with liquid, you can find info here:
https://github.com/Shopify/liquid/wiki/Liquid-for-Designers

About halfway down the page you’ll find info about If/Else statement and below that you’ll find available comparison operators.

It’s a good idea to create new testing template to try out.

2 Likes

Ok @Hans. Thank you very much!