> ## Documentation Index
> Fetch the complete documentation index at: https://foliant-help.iforiti.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 템플릿의 품목

> Liquid에서 주문의 품목을 반복하여 제목, 수량, 가격, SKU, 이미지, 무게, 속성을 인쇄합니다.

주문의 품목은 `line_items`에 있습니다. 품목을 인쇄하려면 목록을 반복하세요. `{% for line_item in line_items %}`와 `{% endfor %}` 사이의 내용은 품목마다 한 번씩 반복되며, `line_item`은 현재 품목입니다. 품목 필드는 반복문 안에서만 작동합니다.

## 기본 품목 표

```liquid theme={null}
<table>
  {% for line_item in line_items %}
    <tr>
      <td>{{ line_item.title }}</td>
      <td>{{ line_item.sku }}</td>
      <td>{{ line_item.quantity }}</td>
      <td>{{ line_item.price | money }}</td>
      <td>{{ line_item.line_price | money }}</td>
    </tr>
  {% endfor %}
</table>
```

## 품목 필드

| 변수 | 인쇄되는 내용 |
| - | - |
| `line_item.title` | 품목의 제목(제품 및 이형 상품) |
| `line_item.name` | 품목의 이름 |
| `line_item.product_title` | 제품의 제목 |
| `line_item.variant_title` | 이형 상품의 제목(예: "Blue / Large") |
| `line_item.quantity` | 주문 수량(환불된 품목 포함) |
| `line_item.fulfillable_quantity` | 아직 처리해야 할 수량 |
| `line_item.refunded_quantity` | 환불된 수량 |
| `line_item.sku` | SKU |
| `line_item.vendor` | 공급업체 |
| `line_item.price` | 품목 할인 적용 후 단가(센트) |
| `line_item.original_price` | 할인 전 단가(센트) |
| `line_item.line_price` | 품목 합계: 단가 × 수량, 품목 할인 적용 후(센트) |
| `line_item.total_discount` | 품목의 할인(센트) |
| `line_item.discount_per_item` | 개당 할인(센트) |
| `line_item.total_tax` | 품목의 세금(센트) |
| `line_item.cost` | 구매 주문서용 품목 원가(센트) |
| `line_item.tax_lines` | 품목의 세금: 반복하여 `title`, `rate`, `price` 사용 |
| `line_item.discount_allocations` | 품목에 적용된 할인: 반복하여 `amount` 사용 |
| `line_item.properties` | 품목 속성. [주문 속성 및 품목 속성](https://foliant-help.iforiti.com/ko/template-editor/liquid-custom-fields.md)을 참조하세요. |
| `line_item.hs_tariff_code` | HS 관세 코드 |
| `line_item.country_of_origin` | 원산지 국가 |
| `line_item.weight` | 품목 1개의 무게(해당 단위 기준) |
| `line_item.grams` | 품목 1개의 무게(그램). `{{ line_item.grams \| weight_with_unit }}`는 단위를 추가합니다 |
| `line_item.total_weight` | 품목 줄의 무게(품목 × 수량) |
| `line_item.image` | 품목의 이미지. `{{ line_item.image \| img_url: 'thumb' \| img_tag }}`로 인쇄합니다 |
| `line_item.requires_shipping` | 배송이 필요한 품목인지 여부 |
| `line_item.gift_card` | 기프트 카드인지 여부 |
| `line_item.product` | 제품(`title`, `type`, `vendor`, `tags`, `handle`…) |
| `line_item.variant` | 이형 상품(`title`, `sku`, `barcode`, `option1`, `inventory_quantity`…) |

## 자주 쓰는 패턴

이형 상품 제목이 있을 때만 제품 아래에 인쇄합니다.

```liquid theme={null}
{{ line_item.product_title }}
{% if line_item.variant_title != blank %}<br>{{ line_item.variant_title }}{% endif %}
```

포장 명세서에서 전액 환불된 품목을 제외합니다.

```liquid theme={null}
{% for line_item in line_items %}
  {% if line_item.quantity > line_item.refunded_quantity %}
    {{ line_item.title }} × {{ line_item.quantity | minus: line_item.refunded_quantity }}
  {% endif %}
{% endfor %}
```

각 SKU의 바코드를 표시합니다.

```liquid theme={null}
{{ line_item.sku | barcode }}
```

## 배송마다 문서 하나

템플릿이 배송마다 문서를 하나씩 인쇄하는 경우(템플릿 설정 페이지의 **분할 배송**), `document_fulfillment`는 인쇄 중인 배송입니다. 해당 배송에 포함된 품목만 나열하려면 다음을 사용하세요.

```liquid theme={null}
{% if document_fulfillment %}
  {% assign line_items = document_fulfillment.line_items %}
{% endif %}
```

## 참고 사항

* 가격은 센트 단위입니다. 항상 money 필터로 인쇄하세요. [템플릿의 금액 및 통화](https://foliant-help.iforiti.com/ko/template-editor/liquid-money-and-currency.md)를 참조하세요.
* 품목 이미지는 `img_url`로 지정한 크기로 인쇄됩니다(예: `'thumb'`, `'small'`, `'medium'`, `'120x120'`).
* 제품 및 이형 상품 메타필드는 `line_item.product.metafields`와 `line_item.variant.metafields`에 있습니다. [템플릿의 메타필드](https://foliant-help.iforiti.com/ko/template-editor/metafields.md)를 참조하세요.
* 반복 변수 이름은 자유롭게 정할 수 있지만, `line_item`을 사용하면 참조 문서 및 기본 템플릿과 일치합니다.
* Bold Product Options와 Infinite Options 주문에는 `line_item.options`, `line_item.option_addon`, `line_item.option_addons` 및 추가 항목을 포함한 가격이 더해지므로, 유료 추가 항목을 해당 품목 아래에 인쇄할 수 있습니다. [상품 옵션 앱(Bold, Infinite Options)](https://foliant-help.iforiti.com/ko/templates/product-options-apps.md)을(를) 참고하세요.

## 관련 문서

* [주문 객체 및 자주 쓰는 변수](https://foliant-help.iforiti.com/ko/template-editor/liquid-order-variables.md)
* [템플릿의 금액 및 통화](https://foliant-help.iforiti.com/ko/template-editor/liquid-money-and-currency.md)
* [주문 속성 및 품목 속성](https://foliant-help.iforiti.com/ko/template-editor/liquid-custom-fields.md)
* [템플릿의 메타필드](https://foliant-help.iforiti.com/ko/template-editor/metafields.md)
* [상품 옵션 앱(Bold, Infinite Options)](https://foliant-help.iforiti.com/ko/templates/product-options-apps.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.