Edit Order confirmation on Shopify using if statement

Tan_S
Tourist
4 0 2

I've been editing the code of the order confirmation on my Shopify store, my target is that if a customer orders a product with "this" tag and the transaction type is "Bank Transfer" then it will show "this" text. I've been trying to edit it but the code doesn't reflect on the email notification of the user. Can anyone have an idea about this?

My Code looks like this:

{% assign found_pnmm = false %}

{% assign found_svmml = false %}

{% for line in subtotal_line_items %}
{% if product.tags contains 'PNMM' and transaction.gateway == 'Bank Transfer' %}
{% assign found_pnmm = true %}

{% elsif product.tags contains 'SVMML' and transaction.gateway == 'Bank Transfer' %}
{% assign found_svmml = true %}

{% endif %}
{% endfor %}

{% if found_pnmm %}
show this
{% elsif found_svmml %}
show that
{% endif %}
Replies 3 (3)
Tan_S
Tourist
4 0 2

Thank you for that, But it's not what I'm asking for. I was asking if what's wrong with the code because it was not triggered on the email received by the customer. 

Mstore1
New Member
2 0 0

Hey there, did you have any luck with figuring this out? I'm trying to do something similar and it's also not working! 

Tan_S
Tourist
4 0 2

Apparently, it's not possible to create 2 conditions in an if-else statement. I just created a collection where if someone purchased from that collection that custom if statement will show, regarding of any payment method used.