2

I have been trying to check a condition on subject section of magento's transactional email.

I'm trying to display order status on subject except for pending.

This is what i have tried so far.

{{if  order.status!="pending"}} {{var order.status}} {{else}} test {{/if}}

Unfortunately this is not working as expected. I'm always getting else condition.

I have no idea why this condition is not working

order.status!="pending"

Any kind of help would be appreciated.

  • 1
    @Piyush it's not explaining how to check for equality and non-equality.. – passion Nov 3 '17 at 6:51
  • you can not use logical expressions in if/depends in email templates . check this magento.stackexchange.com/a/153505/20064 – Piyush Nov 3 '17 at 7:02
  • @Piyush But this says that it can be used in email templates : magento.stackexchange.com/questions/852/… – passion Nov 3 '17 at 7:14
  • you can use if/else for only var = true/false , it won't work with any logical expressions like == or != – Piyush Nov 3 '17 at 8:04
  • @Piyush is there any way to accomplish this? – passion Nov 3 '17 at 9:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.