Untitled

mail@pastecode.io avatar
unknown
liquid
2 years ago
1.2 kB
2
Indexable
Never
{% for item in order.line_items %}
    {
        "mobileImage": {{ item.image | img_url: '750x' | json }},
        "thumbnailImage": {{ item.image | img_url: '300x' | json }},
        "imageAltText": {{ item.image.alt | json }},
        "title": {{ item.title | json }},
        "sku": {{ item.sku | json }},
        "product_type": {{ item.product.type | json }},
        "properties": {{ item.properties | json }},
        "price": {{ item.final_line_price | money | json }},
        "quantity": {{ item.quantity | json }},
        "url": {{ item.url | json }},
        "tracking_number": {{ item.fulfillment.tracking_numbers | json }},
        "tracking_url": {{ item.fulfillment.tracking_urls | json }},
        "fulfillment": [
            {% for fulfillment_item in item.fulfillment.fulfillment_line_items %}
                {
                    "title": {{ fulfillment_item.line_item.title | json }},
                    "number": {{ fulfillment_item.line_item.fulfillment.tracking_numbers | json }}
                }
                {% unless forloop.last %},{% endunless %}
            {% endfor %}
        ]
              }
              {% unless forloop.last %},{% endunless %}
            {% endfor %}