Loading Hurrik.com

How to display the Attribute in Shopify email notification

This code is for multiple attribute display in a email template. You can customize this according your need. In this I have few fields like message, date, name. So I am checking the message is not empty. Same you can do for other fields as well. {% assign count_start =1 %} {% assign comment_title_check= line.product.handle | replace: “`”, ‘ ‘ | replace: ‘-‘, ‘ ‘ | replace: ‘_’, ‘ ‘ | capitalize %} {% for attribute in attributes %} {% assign comment_check= attribute | first | replace: ‘-‘, ‘ ‘ | replace: ‘_’, ‘ ‘ | capitalize %} //checking the field by name {% assign comment_title_checked=comment_title_check | append: ‘ message’ %} {% if comment_check contains comment_title_checked %} {% assign msg=attribute | last %} {% if msg == blank %} <b>Order Message </b>: No message was added and flowers will be delivered anonymously. If you wish to add message please e-mail us immediately at info@blueblossoms.online, {% else %} <b>Order Message</b> : {{ attribute | last }}, {% endif %} {% assign count_start=count_start | plus: 1 %} {% endif %} {% endfor %} Create your own store today and get setup you store for free from us T&C apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

X

Get in touch

Thank you for your interest in hurrik.com Kindly please fill the form and Submit. Our representative will respond to your request as soon as possible.