Liquid, JavaScript, themes, sales channels
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
Solved! Go to the solution
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!
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
Hi @AdamSmith12
Thank you, here is the link and password.
https://gracegarcia-design.com/
Password: hebrug
Thanks for your help.
Carolina
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!
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
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!
Facing the same problem, but the contains solution doesn't work on our end.
@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 %}
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
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!
Are you ready to take your business to the next level? Look no further than the latest ...
By SarahF_Shopify Apr 15, 2024We’re keeping the ball rolling to make sure you’re always ahead of the game. So buckle ...
By JasonH Apr 8, 2024Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024