1

I had passed custom variable to invoice email template and i checked by calling that variable in the invoice template with following code

{{var isused}} and the values is printing in the email template.

Now actually what i want to do is i want to check the variable and accordingly if it is true i need to print the text in the email template.

so i had used following code in the text area in the email template

{{if isused == 'yes'}}
    <tr>
        <td>Hello I m in the if</td>
    </tr>
{{/if}}

now i isused variable value is yes i am sure but the condition is not getting true and not printing the text

Please Help Me

1 Answer 1

2

Why dont you have a condition in the php file , Where you check the condition decide the string according to the condition and call the variable in the email templates which contains a string and print the string in the Email Templates .

It will be a better option.

1
  • Question was if you can answer what has been asked i.e., the way to use comparison operator in magento's transactional email Commented Oct 4, 2016 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.