0

I'm trying to get a conditional to work in a Magento email template, but for whatever reason, I can't get the 'if' to evaluate to true. In my template, I have:

Shipping Method:{{var order.shipping_method}}<br /><br />
{{if order.shipping_method=="wsastorepickup_wsastorepickup"}}
   Run this<br /><br />
{{else}}
    WTF, OVER?<br /><br />
{{/if}}

When Magento sends the email it has:

Shipping Method:wsastorepickup_wsastorepickup

WTF, OVER?

I've tried it with and without the 'var' in the conditional. What am I missing?

John
  • 65
  • 2
  • 13
  • Further testing has this outputting 'Fail': {{if "test" == "test"}} Success

    {{else}} Fail

    {{/if}}
    – John Nov 06 '17 at 19:44
  • The question has been asked before: [Check out the answer here](https://stackoverflow.com/q/4797394/8897789) – RLessard Nov 08 '17 at 06:57

0 Answers0