We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more

How to personalize email order confirmations based on payment method?

Solved

How to personalize email order confirmations based on payment method?

LaseMakers
Shopify Partner
104 1 29

Hi,

I need help.

Im having problems setting my email order confirmation.

I have to personalize it, depending on the payment method for example, if someone pays with Cash on Delivey is a different email that if someone pays with credit card.

I was able to "Bank Deposit" and the email comes out great, but on "Cash on delivery (COD)" it didn't work, I dont understand why if both are in the same way.

This is how it looks:

{% for transaction in transactions %}
{% if transaction.gateway_display_name == "Bank Deposit." %}

Puedes continuar con tu pago, depositando a la cuenta corriente del Banco XXXXXXX número: XXXXXXXX a nombre de XXXXXXX. Al finalizar por favor envíanos confirmación de pago al correo: XXXXXXXXXXXXXXXXXX.

{% endif %}
{% endfor %}

{% for transaction in transactions %}
{% if transaction.gateway_display_name == "Pago contra entrega" %}

Recibirás un correo electrónico cuando tu pedido sea enviado.

{% endif %}
{% endfor %}

I will really appreciate your help.

Thank you!!!

Carolina

 

Accepted Solution (1)

LitExtension
Shopify Partner
4963 1010 1192

This is an accepted solution.

Hi @LaseMakers

You can try my solution.

Please change transaction.gateway_display_name == "Pago contra entrega" to transaction.gateway_display_name contains "Pago contra entrega"

Please let me know if you need further support after changing that. Hope this helps! 

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
Contact us:
- Email: contact@litextension.com

View solution in original post

Replies 9 (9)

AdamSmith12
Shopify Partner
79 5 8

can you please give link of your store to check the valuer of the payment method and I can help you with this issues if you want

If helpful then please Like and ✔️ Accept Solution.
Do you need custom changes on store ? please send me a personal message and we can discuss.
Email: redaboubkraoui@gmail.com
LaseMakers
Shopify Partner
104 1 29

Hi @AdamSmith12 

Thank you, here is the link and password.

https://gracegarcia-design.com/

Password: hebrug

Thanks for your help.

Carolina 

 

LitExtension
Shopify Partner
4963 1010 1192

This is an accepted solution.

Hi @LaseMakers

You can try my solution.

Please change transaction.gateway_display_name == "Pago contra entrega" to transaction.gateway_display_name contains "Pago contra entrega"

Please let me know if you need further support after changing that. Hope this helps! 

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
Contact us:
- Email: contact@litextension.com
LaseMakers
Shopify Partner
104 1 29

Hi @LitExtension 

Thank you so much you save my page, all it needed was to add "contains", the weird thing is that with others pages it worked well how I had it.

Best regards. 

 

Carolina 

LitExtension
Shopify Partner
4963 1010 1192

Hi @LaseMakers

It's our pleasure when helping you with your issue and getting accepted as a solution.

If you need further support, just let me know and we will support you dedicatedly.

Have a great day!

LitExtension - Shopping Cart Migration Expert
Check out our Shopify migration app to migrate your online store to Shopify
Contact us:
- Email: contact@litextension.com
Livom
Visitor
3 0 0

Facing the same problem, but the contains solution doesn't work on our end.

 

{% if transaction.gateway_display_name contains "Vorauskasse" %}
                <td class="customer-info__item">
                  <h4>Bankdaten für Vorauskasse</h4>
                  <p>livom möbel gmbh<br/>Nordstrasse 13<br/>8580 Amriswil</p>
  <p>IBAN: CH73 0078 4297 4200 4200 1<br/>BIC/Swift: KBTGCH22<br/>Thurgauer Kantonalbank</p>
{% else %}<p>tralala</p>  
                </td>
                {% endif %}
 
 
 
 
Weedlover
Excursionist
17 0 5

@Livom wrote:

Facing the same problem, but the contains solution doesn't work on our end.

 

{% if transaction.gateway_display_name contains "Vorauskasse" %}
                <td class="customer-info__item">
                  <h4>Bankdaten für Vorauskasse</h4>
                  <p>livom möbel gmbh<br/>Nordstrasse 13<br/>8580 Amriswil</p>
  <p>IBAN: CH73 0078 4297 4200 4200 1<br/>BIC/Swift: KBTGCH22<br/>Thurgauer Kantonalbank</p>
{% else %}<p>tralala</p>  
                </td>
                {% endif %}
 
 
 
 

I am having the same issue. Did you find a solution since your post?

This is my code. My payment method is called "Überweisung / Vorkasse" and gets displayed in lowercase sometimes from shopify. Because of that I am using the downcase filter.

 

{% assign zahlungsart = transaction.gateway_display_name | downcase %}
{% if zahlungsart contains 'vorkasse' %}
<br />
<p>
Bitte überweise den offenen Betrag an:
</p>
<p>
<strong>Gras im Glas</strong><br />
IBAN: <br />
BIC: <br />
Bank: k<br />
Verwendungszweck: {{ order_number }}
</p>
<p>Nach Zahlungseingang versenden wir umgehend deine Bestellung.<p>
{% endif %}

asalklar
New Member
9 0 0

Hi

I do have the same issue. I am looking to solve the same for "Vorkasse". Did you solve the problem in the meantime? How must the code look like in the order confirmation template?

I really look forward to a solution

SchlechteKarten
New Member
4 0 0

For me @LitExtension's solution didn't work either. But I could solve it by using simply "gateway" instead of "transaction.gateway_display_name" or "transaction.gateway". Like this:

{% if gateway == "My custom payment method" %}

 I hope this works for others too!