From your Admin Page, click Online Store > Settings on your left hand corner
Go to Notifications, place the code below anywhere inside the {% for line in subtotal_line_items %} and {% endfor %}
Note: Change the product.metafields.custom.title, to the namespace and key you have, and add line. before it
{% case line.product.metafields.custom.title | metafield %}
{% when "title1" %}
put your text here...
{% when "title2" %}
put your text here...
{% when "title3" %}
put your text here...
{% endcase %}
Hi, i’m just trying to implement this code in my notification now.
I’ve edited it to this …
{% case order.metafields.custom.select_delivery_status | metafield %} {% when “left_in_safe_place” %} Message 1 {% when “delivered_to_recipient” %} Message 2 {% when “redelivery” %} Message 3 {% endcase %}
Am i correct to use _ for spaces in the names of each option?
Also the metafield i’m using is an order metafield. Not product.
Does it make a difference where i place the code, as i would like to add it to the body or just below (before the view my order & visit our store buttons). But wasn’t sure if this was why it was not working?
Hi, sorry i should have stated originally that i am looking to add this feature into the ‘local delivery delivered’ and ‘shipping confirmation’ emails.
I looked and cant seem to find {% for line in subtotal_line_items %} in either of those emails. Just the order confirmation. Would this be correct?