Re: Edit order confirmation email based on transaction gateway

Solved

Edit order confirmation email based on transaction gateway

stefanolaporta
Visitor
3 0 1

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 %}

 

Accepted Solution (1)

ThomasBorowski
Shopify Partner
803 71 242

This is an accepted solution.

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.

★ Smart Upgrades, Tips and Tutorials for Shopify themes: cartpunk.com
Did my solution work? Help other Community members easily find the correct solution and apply it to their own stores by marking it as the Accepted Solution and giving it a Thumbs Up

View solution in original post

Reply 1 (1)

ThomasBorowski
Shopify Partner
803 71 242

This is an accepted solution.

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.

★ Smart Upgrades, Tips and Tutorials for Shopify themes: cartpunk.com
Did my solution work? Help other Community members easily find the correct solution and apply it to their own stores by marking it as the Accepted Solution and giving it a Thumbs Up