> ## 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 변수입니다.

모든 문서는 하나의 주문(일괄 템플릿의 경우 선택한 주문들)을 기준으로 생성됩니다. Liquid에서는 주문의 필드를 `{{ name }}`처럼 바로 사용할 수 있고, `{{ order.name }}`처럼 `order` 아래에서도 사용할 수 있습니다. 두 방식은 똑같이 동작합니다. 변수는 Shopify Order Printer의 변수를 따르므로, 대부분의 Order Printer 템플릿은 Foliant에서 그대로 사용할 수 있습니다.

코드 편집기의 **Liquid 변수** 탭에서 모든 변수를 검색과 함께 확인할 수 있습니다. 이 문서에서는 가장 자주 쓰는 변수를 설명합니다. 금액 값은 센트 단위입니다. [템플릿의 금액과 통화](https://foliant-help.iforiti.com/ko/template-editor/liquid-money-and-currency.md)를 참고하세요.

## 주문

| 변수 | 출력 내용 |
| - | - |
| `{{ order_name }}` 또는 `{{ name }}` | # 기호가 붙은 주문 이름(`#1042`) |
| `{{ order_number }}` | 주문 번호(`1042`) |
| `{{ id }}` | 주문 ID |
| `{{ po_number }}` | 구매 주문서 번호 |
| `{{ date }}` 또는 `{{ created_at }}` | 주문한 날짜. `date` 필터로 형식을 지정하세요. |
| `{{ processed_at }}`, `{{ updated_at }}`, `{{ cancelled_at }}`, `{{ closed_at }}` | 그 밖의 주문 날짜 |
| `{{ completed_at }}` | 임시 주문이 완료된 날짜 |
| `{{ financial_status }}` | `paid`, `pending`, `partially_refunded` 등의 결제 상태 |
| `{{ fulfillment_status }}` | `unfulfilled`, `fulfilled` 등의 주문 처리 상태 |
| `{{ note }}` | 주문 메모 |
| `{{ tags }}` | 주문 태그(목록이므로 `{% for tag in tags %}`로 반복하세요) |
| `{{ email }}` | 주문 이메일 |
| `{{ customer_locale }}` | 고객이 쇼핑한 언어 |
| `{{ order_status_url }}` | 주문 상태 페이지 링크(온라인 주문) |
| `{{ total_items }}` 또는 `{{ item_count }}` | 품목 수 |
| `{{ total_weight }}` | 총 무게. `{{ total_weight_in_grams \| weight_with_unit }}`를 사용하면 단위가 붙습니다 |
| `{{ order_currency }}` 또는 `{{ currency }}` | 주문의 통화 코드 |
| `{% if pickup_in_store? %}…{% endif %}` | 매장 픽업 주문인지 여부 |
| `{{ location.name }}` | POS 위치(POS 주문). `address1`, `city`, `zip`, `country`, `phone` 등도 사용할 수 있습니다 |

## 합계

합계는 `{{ total_price | money }}`처럼 금액 필터를 사용해 출력하세요.

| 변수 | 의미 |
| - | - |
| `subtotal_price` | 소계 |
| `shipping_price` | 배송비 |
| `total_discounts` | 전체 할인 |
| `order_level_discounts` | 주문 전체 할인(품목 가격에 포함되지 않음) |
| `total_tax` | 세금 |
| `total_line_items_tax`, `total_shipping_tax` | 품목 세금, 배송 세금 |
| `total_duties` | 관세 |
| `total_price` | 주문 합계 |
| `total_paid` | 결제된 금액 |
| `total_refunds` | 환불된 금액 |
| `total_gift_cards` | 기프트 카드로 결제된 금액 |

`current_subtotal_price`, `current_total_discounts`, `current_total_tax`, `current_total_price`도 사용할 수 있습니다.

## 고객과 주소

| 변수 | 출력 내용 |
| - | - |
| `{{ customer.name }}`, `{{ customer.first_name }}`, `{{ customer.last_name }}` | 고객 이름 |
| `{{ customer.email }}`, `{{ customer.phone }}` | 연락처 |
| `{{ customer.note }}` | 고객 메모 |
| `{{ customer.tags }}` | 고객 태그 |
| `{{ customer.total_spent \| money }}` | 고객의 총 구매 금액 |
| `{% if customer.tax_exempt %}` | 고객의 세금 면제 여부 |
| `{{ shipping_address \| format_address }}` | 줄바꿈으로 정리된 배송 주소 |
| `{{ billing_address \| format_address }}` | 청구 주소 |

각 주소(`shipping_address`, `billing_address`, `customer.default_address`)에는 `name`, `first_name`, `last_name`, `company`, `address1`, `address2`, `street`, `city`, `province`, `province_code`, `zip`, `country`, `country_code`, `phone`, `city_province_zip`이 있습니다. `{% if shipping_address.member_of_eu %}`로 국가가 EU에 속하는지 확인할 수 있습니다.

## 스토어

| 변수 | 출력 내용 |
| - | - |
| `{{ shop.name }}` 또는 `{{ shop_name }}` | 스토어 이름 |
| `{{ shop.email }}`, `{{ shop.phone }}`, `{{ shop.domain }}` | 연락처 |
| `{{ shop.address1 }}`, `{{ shop.city }}`, `{{ shop.zip }}`, `{{ shop.country }}`… | Shopify에 설정된 주소 |
| `{{ shop_logo_url }}`, `{{ shop_logo_width }}`, `{{ shop_accent_color }}` | **설정 › 브랜딩**에서 설정한 로고와 강조 색상 |
| `{{ shop.vat_number }}`, `{{ shop.eori }}` | **설정 › 세금 및 법률 정보**에서 설정한 부가가치세(VAT) 번호와 EORI |
| `{{ seller.legal_lines \| join: ' · ' }}` | 문서 언어로 된 법률 정보(항목당 한 줄) |

## 배송, 결제, 주문 처리

| 변수 | 출력 내용 |
| - | - |
| `{{ shipping_method.title }}` | 배송 방법 |
| `{% for shipping_line in shipping_lines %}` | 각 배송 항목: `title`, `code`, `price` |
| `{{ payment_method }}`, `{{ gateway }}` | 주문 결제 방법 |
| `{% for transaction in transactions %}` | 각 거래: `amount`, `kind`, `status`, `gateway`, `created_at` |
| `{% for tax_line in tax_lines %}` | 각 세금: `title`, `rate`, `price` |
| `{% for discount in discounts %}` | 각 할인: `code`, `amount`, `savings` |
| `{% for fulfillment in fulfillments %}` | 각 주문 처리: `tracking_number`, `tracking_company`, `created_at` |
| `{{ latest_fulfillment }}` | 가장 최근 주문 처리 |
| `{% for refund in refunds %}` | 각 환불: `created_at`, `note`, `subtotal`, `total_tax`, `total`, `refund_line_items` |
| `{{ latest_refund }}` | 가장 최근 환불(대변표) |
| `{{ payment_terms.due_in_days }}` | 결제 조건(B2B 및 임시 주문). `payment_schedules`, `current_payment_schedule.due_at`도 사용할 수 있습니다 |

## 예시

```liquid theme={null}
<h1>{{ 'titles.invoice' | t }} {{ order_name }}</h1>
<p>{{ created_at | date: '%d %B %Y' }}</p>
<p>{{ shipping_address | format_address }}</p>
<p>{{ 'total' | t }}: {{ total_price | money }}</p>
{% if note != blank %}<p>{{ note | escape }}</p>{% endif %}
```

## 참고 사항

* 값이 비어 있으면 아무것도 출력되지 않습니다. 값이 없을 때 레이블을 생략하려면 `{% if … != blank %}`를 사용하세요.
* 선택한 모든 주문을 위한 템플릿은 단일 주문 대신 `orders`(`{% for order in orders %}`로 반복), `batch`, `pick_list`를 사용합니다. **Liquid 변수** 탭의 **일괄 템플릿** 섹션을 참고하세요.
* 부가가치세(VAT) 인보이스는 참조의 **부가가치세(VAT)** 섹션을 참고하세요: `tax_breakdown`, `buyer.vat_number`, `{% include 'vat_breakdown' %}`, `{% include 'legal_notes' %}`. [세금 및 법률 정보](https://foliant-help.iforiti.com/ko/tax-and-legal.md)도 참고하세요.

## 관련 문서

* [템플릿의 품목](https://foliant-help.iforiti.com/ko/template-editor/liquid-line-items.md)
* [템플릿의 금액과 통화](https://foliant-help.iforiti.com/ko/template-editor/liquid-money-and-currency.md)
* [Liquid 필터](https://foliant-help.iforiti.com/ko/template-editor/liquid-filters.md)
* [템플릿 코드 편집](https://foliant-help.iforiti.com/ko/template-editor/code-editor.md)


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