How to add cart attributes and cart note to email notification?

14 0 2

Hi There,

We add cart attributes to our cart.liquid. and tried to add those attributes to our email notification. here is the code in our cart template:

<p class="cart-attribute__field">
              <input type="hidden" name="attributes[delayed-delivery]" value="No">
              <input type="checkbox" name="attributes[delayed-delivery]" value="Yes"{% if cart.attributes["Delayed Delivery"] == "Yes" %} checked{% endif %}>
              <label>Delayed Delivery</label>
            <textarea name="note" id="CartSpecialInstructions" class="cart-note__input"  placeholder="Tell us which week within the next 90 days you would like your tiles delivered. DD/MM/YYYY">{{ cart.note }}</textarea>

Here is the code we added to the email notification:

{% for attribute in attributes %}
<div class="order-note">
Order Note: {{order.note}}
Attribute: {{ attributes.delayed-delivery }}

We also added a code to the checkout.

{% if order.note != blank %}

     '<h2>Order notes</h2>',
  'Attributes: {{ cart.attributes.delayed-delivery }}',
     '<p>{{ order.note }} </p>'
{% endif %}


Only the order note is working on the status page. How can we add the cart note and the cart attributes to our order email notification?