Edit order confirmation email based on transaction gateway

Hi all,

I’m trying to customize order confirmation email.

I’m trying to fetch transaction gateway so that, depending on its value, the email should some text instead of another.

The problem is, it doesn’t even work in the “else”, where i try to show up the rendered object. Instead, it only shows the “abc”.

{% case transaction.gateway_display_name %}
{% when "Bonifico" %}
xxx
{% when "Postagiro" %} 
yyy
{% when "Bollettino c/c" %} 
zzz
{% else %} 
{{ transaction.gateway_display_name }} abc
{% endcase %}

Is that code wrapped in an outer loop where you’re iterating through all the transactions on the order? Because the order itself doesn’t have a “transaction”, it only has an array of all transactions that you have to loop through to get each individual transaction.

1 Like