Solved

Manual Payment Email confirmation order

francescoromito
Tourist
10 0 3

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)
MarcoReleasit
Shopify Partner
314 24 60

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

Install Releasit Cash On Delivery for free here: https://apps.shopify.com/cash-on-delivery-fee
Add a fee to Cash on Delivery and limit COD based on any condition (order total, location, products, collections, etc.)

View solution in original post

Replies 5 (5)

MarcoReleasit
Shopify Partner
314 24 60

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

Install Releasit Cash On Delivery for free here: https://apps.shopify.com/cash-on-delivery-fee
Add a fee to Cash on Delivery and limit COD based on any condition (order total, location, products, collections, etc.)
francescoromito
Tourist
10 0 3

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)" -%} ? 

francescoromito
Tourist
10 0 3
MarcoReleasit
Shopify Partner
314 24 60

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

Install Releasit Cash On Delivery for free here: https://apps.shopify.com/cash-on-delivery-fee
Add a fee to Cash on Delivery and limit COD based on any condition (order total, location, products, collections, etc.)
francescoromito
Tourist
10 0 3

thank you so much!