Manual Payment Email confirmation order

Solved
francescoromito
New Member
5 0 0

hi, 
I have a manual payment option on the website (cash on delivery) 
i would like to send a personalized email for order confirmation when a user chooses Cash on delivery 

which is the variable I should put in the logic sequence? 
so I think in the HTML of the email it should be something like 
if variable_gateway == cashondelivery => do something 

Accepted Solution (1)

Accepted Solutions
MarcoReleasit
Shopify Partner
148 13 39

This is an accepted solution.

Hi @francescoromito 

If you have activated the Cash on Delivery (COD) payment method on your payments settings in Shopify you should leave "Cash on Delivery (COD)", otherwise if you have created a custom payment method for COD you should change it to the text the you see on your Shopify Payments settings

Regarding the message, here's the updated code with the message you indicated:

{%- assign order_is_cash_on_delivery = false -%}
        {%- for transaction in transactions -%}
    {%- if transaction.status == "success" or transaction.status == "pending" -%}
    {%- if transaction.gateway == "Cash on Delivery (COD)" -%}
    {%- assign order_is_cash_on_delivery = true -%}
    {%- endif -%}
    {%- endif -%}
    {%- endfor -%}
    {%- if order_is_cash_on_delivery -%}
    <p>la spedizione in contrassegno prevede un ammontare di €4 aggiuntivo</p>
    {%- endif -%}

Hope this helps!

Marco

View solution in original post

Replies 5 (5)
MarcoReleasit
Shopify Partner
148 13 39

Hi @francescoromito 

 

Here's the code snippet you can use to show a message on your notification emails for Cash on Delivery orders:

{%- assign order_is_cash_on_delivery = false -%}
        {%- for transaction in transactions -%}
    {%- if transaction.status == "success" or transaction.status == "pending" -%}
    {%- if transaction.gateway == "Cash on Delivery (COD)" -%}
    {%- assign order_is_cash_on_delivery = true -%}
    {%- endif -%}
    {%- endif -%}
    {%- endfor -%}
    {%- if order_is_cash_on_delivery -%}
    INSERT YOUR CUSTOM CASH ON DELIVERY CODE HERE
    {%- endif -%}

You can add your custom COD code in place of the INSERT YOUR CUSTOM CASH ON DELIVERY CODE HERE

 

Hope this helps!

 

Marco

francescoromito
New Member
5 0 0

Hi Marco, 

thank you so much for the response on the topic !


I shoud write in italian "la spedizione in contrassegno prevede un ammontare di €4 aggiuntivo" 

and another thing: 
in the website the manual payment cod is put as "Contrassegno" (italian meaning of Cash on delivery) 
should I change also this  {%- if transaction.gateway == "Cash on Delivery (COD)" -%} ? 

MarcoReleasit
Shopify Partner
148 13 39

This is an accepted solution.

Hi @francescoromito 

If you have activated the Cash on Delivery (COD) payment method on your payments settings in Shopify you should leave "Cash on Delivery (COD)", otherwise if you have created a custom payment method for COD you should change it to the text the you see on your Shopify Payments settings

Regarding the message, here's the updated code with the message you indicated:

{%- assign order_is_cash_on_delivery = false -%}
        {%- for transaction in transactions -%}
    {%- if transaction.status == "success" or transaction.status == "pending" -%}
    {%- if transaction.gateway == "Cash on Delivery (COD)" -%}
    {%- assign order_is_cash_on_delivery = true -%}
    {%- endif -%}
    {%- endif -%}
    {%- endfor -%}
    {%- if order_is_cash_on_delivery -%}
    <p>la spedizione in contrassegno prevede un ammontare di €4 aggiuntivo</p>
    {%- endif -%}

Hope this helps!

Marco

View solution in original post

francescoromito
New Member
5 0 0

thank you so much!