559 votes
1 answers
javascript - Customize Order confirmation email with line item properties
I'm customizing order confirmation email but when I tried to send line item property, it shows as name and value in one line like this. Width900. I want to show Width: 900 in name: value format.
How can I do this?
{% for line in subtotal_line_items %}
{% for p in line.properties %}
<span>{{ p }}</span><br/>
{% endfor %}
{% endfor %}
Undefined asked
109
votes
Answer
Solution:
line.properties
will give you a json object. Try this
{% for line in subtotal_line_items %}
{% for p in line.properties %}
<span>{{ p.first }}: {{ p.last }}</span><br/>
{% endfor %}
{% endfor %}
Undefined answered
Source
Didn't find the answer?
Our community is visited by hundreds of Shopify development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.