Shopify Order Printer에 대한 Liquid 변수 및 필터 참조

Shopify Order Printer 앱을 사용하여 자체 사용자 지정 템플릿을 구축하기 위해 Liquid를 사용할 수 있습니다. Liquid를 사용하면 텍스트 템플릿을 생성하고 각 주문의 고유 데이터에 따라 렌더링할 수 있습니다.

이 페이지에 나열된 Liquid 참조는 Liquid 오픈 소스 버전의 확장 프로그램으로 Shopify Order Printer 앱에서 사용되어야 합니다. ordershop 속성에 따라 정보를 렌더링하기 위해 이 참조에서 개체, 태그 및 필터 목록을 사용하여 템플릿을 사용자 지정할 수 있습니다. Admin GraphQL API 문서도 사용하여 개체 필드에 대한 세부 정보를 배울 수도 있습니다.

변수 및 속성 사용

Shopify Order Printer 템플릿에서 핵심 데이터 개체는 ordershop입니다. 주문 속성에 액세스하기 위해 order.variable_name을 사용할 수 있습니다.

다음의 일반적으로 사용되는 여러 주문 속성은 order. 접두사 없이 액세스할 수 있습니다.

  • line_items
  • tax_lines
  • fulfillments
  • transactions
  • discounts
  • refunds
  • shipping_methods
  • customer

예를 들어, 품목 변수에 액세스하려는 경우 line_items 또는 order.line_items를 사용할 수 있습니다.

Shopify Order Printer에서 사용할 수 있는 Liquid 변수

사용 가능한 클래스는 다음과 같습니다. 특성은 알파벳순으로 나열됩니다.

주문

Shopify Order Printer에서 사용할 수 있는 Order 특성은 다음과 같습니다.

  • attributes
  • b2b
  • billing_address
  • cancel_reason
  • cancel_reason_label
  • cancelled
  • cancelled_at
  • cart_level_discount_applications
  • checkout_id
  • checkout_payment_collection_url
  • company
  • company_location
  • confirmation_number
  • created_at. 주문이 처리된 시간입니다. 이는 GraphQL API의 order.processed_at과 같습니다. date 필터를 사용하여 타임 스탬프의 형식을 지정합니다(예: {{ order.created_at | date: "%B %e, %Y" }}).
  • customer
  • discounts. 모든 할인 유형 및 세부 정보가 캡처되지 않았으므로 사용 중지되었습니다. order.discounts 속성이 order.discount_applications로 대체되었습니다.
  • discounts_amount. 모든 할인 유형 및 세부 정보가 캡처되지 않았으므로 사용 중지되었습니다. order.discounts 속성이 order.total_discounts로 대체되었습니다.
  • discount_applications
  • discounts_savings. 모든 할인 유형 및 세부 정보가 캡처되지 않았으므로 사용 중지되었습니다. order.discounts 속성이 -로 대체되었습니다.
  • email
  • fees
  • financial_status
  • financial_status_label
  • fulfilled_line_items
  • fulfillment_aborted
  • fulfillment_status
  • fulfillments
  • gateway
  • id
  • item_count
  • landing_site
  • landing_site_ref
  • line_items
  • line_items_subtotal_price
  • location
  • metafields
  • name
  • net_payment
  • note
  • order_name
  • order_number
  • order_status_url
  • payment
  • payment_details
  • po_number
  • refunds
  • requires_shipping
  • shipping_address
  • shipping_method
  • shipping_methods
  • shipping_price
  • shop
  • shop_name
  • subtotal_price
  • tags
  • tax_lines
  • tax_price
  • tip_line_items
  • total_discounts
  • total_duties
  • total_landed_cost_additional_fees
  • total_net_amount
  • total_outstanding
  • total_price
  • total_refunded_amount
  • total_tip
  • transactions
  • unacceptable_risks
  • unfulfilled_line_items
  • unique_gateways
  • user
  • void_transactions

Shop

Shopify Order Printer에서 사용할 수 있는 다음 Shop 특성 목록을 검토하세요.

  • accepts_gift_cards
  • account_owner
  • allows_discounts
  • checkout
  • checkout_requires_confirmation_step
  • collections_count
  • contact_information
  • currency
  • customer_accounts_enabled
  • customer_accounts_optional
  • description
  • domain
  • email
  • email_accent_color
  • email_logo_url
  • email_logo_width
  • email_marketing
  • enabled_currencies
  • enabled_locales
  • enabled_payment_types
  • features
  • id
  • latitude
  • legal_notice
  • longitude
  • metafields
  • money_format
  • money_with_currency_format
  • name
  • password_message
  • permanent_domain
  • phone
  • policies
  • privacy_policy
  • products_count
  • refund_policy
  • secure_url
  • shipping_policy
  • subscription_policy
  • terms_of_sale
  • terms_of_service
  • types
  • url

LineItem

Shopify Order Printer에서 사용할 수 있는 다음 Line Item 특성 목록을 검토하세요.

  • aggregated_update
  • applied_discounts. 모든 할인 유형 및 세부 정보를 사용할 수 없으므로 사용 중지되었습니다. line_item.discounts 속성이 line_item.discount_allocations로 대체되었습니다.
  • current_quantity
  • discount_allocations
  • discounts. 모든 할인 유형 및 세부 정보를 사용할 수 없으므로 사용 중지되었습니다. line_item.discounts 속성이 line_item.discount_allocations로 대체되었습니다.
  • final_line_price
  • final_price
  • fulfillment
  • fulfillment_service
  • gift_card
  • grams
  • groups
  • id
  • image
  • index
  • item_updates
  • json_filter
  • key
  • line_level_discount_allocations
  • line_level_total_discount
  • line_price. 자동 할인 및 할인 코드의 할인이 포함되어 있지 않으므로 사용 중지되었습니다. line_item.line_price 속성이 line_item.final_line_price로 대체되었습니다.
  • message
  • options_with_values
  • original_line_price
  • original_price
  • price. 자동 할인 및 할인 코드의 할인이 포함되어 있지 않으므로 사용 중지되었습니다. line_item.price 속성이 line_item.final_price로 대체되었습니다.
  • product
  • product_id
  • properties
  • quantity
  • refunded_quantity
  • requires_shipping
  • selling_plan_allocation
  • sku
  • successfully_fulfilled_quantity
  • tax_lines
  • taxable
  • title
  • total_discount. 자동 할인 및 할인 코드의 할인이 포함되어 있지 않으므로 사용 중지되었습니다. line_item.total_discount 속성이 line_item.line_level_total_discount로 대체되었습니다.
  • unit_price
  • unit_price_measurement
  • url
  • url_to_remove
  • variant
  • variant_id
  • vendor

주문 처리

Shopify Order Printer에서 사용할 수 있는 다음 Fulfillment 특성 목록을 검토하세요.

  • created_at. date 필터를 사용하여 타임 스탬프의 형식을 지정합니다(예: {{ fulfillment.created_at | date: "%B %e, %Y" }}).
  • estimated_delivery_at
  • fulfillment_line_items
  • item_count
  • line_items
  • requires_shipping
  • tracking_company
  • tracking_number
  • tracking_numbers
  • tracking_url
  • tracking_urls
  • updated_at

주소

Shopify Order Printer에서 사용할 수 있는 다음 Address 특성 목록을 검토하세요.

  • address1
  • address2
  • city
  • company
  • country
  • country_code
  • country_upper
  • errors
  • first_name
  • id
  • last_name
  • name
  • phone
  • province
  • province_code
  • street
  • summary
  • translated_country_name
  • translated_province_name
  • url
  • zip

고객

Shopify Order Printer에서 사용할 수 있는 다음 Customer 특성 목록을 검토하세요.

  • accepts_marketing
  • account_activation_url
  • addresses
  • addresses_count
  • b2b?
  • default_address
  • email
  • first_name
  • has_account
  • id
  • last_name
  • last_order
  • metafields
  • name
  • new_address
  • orders
  • orders_count
  • payment_methods
  • phone
  • reset_password_url
  • subscribe_url
  • tags
  • tax_exempt
  • total_spent

DiscountApplication

Shopify Order Printer에서 사용할 수 있는 다음 DiscountApplication 특성의 목록을 검토하세요.

  • target_selection
  • target_type
  • title
  • total_allocated_amount
  • type
  • value_type
  • value

할인 인쇄

전체 주문 또는 특정 품목에 할인을 적용할 수 있습니다.

  • 주문 수준 할인: 전체 주문에 적용됩니다. 주문 인보이스 인쇄 시 이러한 할인을 하단에 별도로 표시할 수 있습니다.
  • 품목 수준 할인: 개별 품목에 적용됩니다. 품목 섹션에서 개별 품목 세부 정보를 인쇄할 때 이러한 할인을 언급할 수 있습니다.

다음 변수를 사용하여 할인 정보에 액세스할 수 있습니다.

  • order.total_discounts 값 또는 order.discount_applications 컬렉션이 있는 주문 또는 해당 품목의 모든 주문에 적용되는 모든 할인에 액세스합니다.
  • line_item.line_level_total_discount 값 또는 line_item.line_level_discount_allocations 컬렉션이 있는 품목 할인에 액세스합니다.

    • line_item.original_price 값이 있는 모든 할인을 적용하기 전의 품목 가격에 액세스합니다.
    • line_item.final_price 값이 있는 모든 관련 품목 수준 할인을 적용한 후의 품목 가격에 액세스합니다.
    • line_item.original_line_priceline_item.final_line_price 값은 line_item.original_priceline_item.final_price 값에 line_item.quantity을 곱한 것과 같습니다.
  • order.cart_level_discount_applications 컬렉션이 있는 주문 수준 할인에 액세스합니다.

품목 수준 할인을 인쇄하기 위한 예시 코드 블록:

{% for line_item in order.line_items %}
  <tr>
    <td>{{ line_item.quantity }}</td>
    <td>{{ line_item.title }}
    {% if line_item.line_level_discount_allocations.size > 0 %}
      <span class="subduedText">
        {% for discount_allocation in line_item.line_level_discount_allocations %}
        <br>{{ discount_allocation.discount_application.title }} (-{{ discount_allocation.amount | money }})
        {% endfor %}
      </span>
    {% endif %}
    </td>
    <td style="text-align: right;">
      {% if line_item.original_price != line_item.final_price %}
        <span class="subduedText"><s>{{ line_item.original_price | money }}</s></span>
      {% endif %}
      {{ line_item.final_price | money }}
    </td>
  </tr>
{% endfor %}

주문 수준 할인을 인쇄하기 위한 예시 코드 블록:

{% for discount_application in order.cart_level_discount_applications %}
<tr>
  <td colspan="2" style="text-align: right;">{% if discount_application.title %}<span class="subduedText">{{ discount_application.title }}</span>{% endif %}</td>
  <td style="text-align: right;">-{{ discount_application.total_allocated_amount | money }}</td>
</tr>
{% endfor %}

DiscountAllocation

Shopify Order Printer에서 사용할 수 있는 다음 DiscountAllocation 특성 목록을 검토하세요.

  • amount
  • discount_application

할인

Shopify Order Printer에서 사용할 수 있는 다음 Discount 특성의 목록을 검토하세요.

  • amount
  • code
  • free_shipping_discount
  • id
  • savings
  • title
  • total_amount
  • total_savings

제품

Shopify Order Printer에서 사용할 수 있는 다음 Product 특성 목록을 검토하세요.

  • as_json
  • available
  • collections
  • compare_at_price
  • compare_at_price_max
  • compare_at_price_min
  • compare_at_price_varies
  • content
  • created_at
  • description
  • featured_image
  • featured_media
  • first_available_variant
  • gift_card?
  • handle
  • has_only_default_variant
  • id
  • images
  • json_filter
  • media
  • metafields
  • object_type
  • options
  • options_by_name
  • options_with_values
  • price
  • price_max
  • price_min
  • price_varies
  • published_at
  • requires_selling_plan
  • selected_or_first_available_selling_plan_allocation
  • selected_or_first_available_variant
  • selected_selling_plan
  • selected_selling_plan_allocation
  • selected_variant
  • selling_plan_groups
  • tags
  • template_suffix
  • title
  • type
  • url
  • variants
  • vendor

이형 상품

Shopify Order Printer에서 사용할 수 있는 다음 Variant 특성 목록을 검토하세요.

  • as_json
  • available
  • barcode
  • compare_at_price
  • featured_image
  • featured_media
  • id
  • image
  • incoming
  • inventory_management
  • inventory_policy
  • inventory_quantity
  • json_filter
  • metafields
  • next_incoming_date
  • option1
  • option2
  • option3
  • options
  • price
  • product
  • requires_selling_plan
  • requires_shipping
  • selected_selling_plan_allocation
  • selling_plan_allocations
  • sku
  • store_availabilities
  • taxable
  • title
  • unit_price
  • unit_price_measurement
  • url
  • weight
  • weight_in_unit
  • weight_unit

환불

Shopify Order Printer에서 사용할 수 있는 다음 Refund 특성 목록을 검토하세요.

  • amount
  • created_at
  • id
  • note
  • refund_line_items
  • restock
  • transactions

ShippingLine

Shopify Order Printer에서 사용할 수 있는 다음 Shipping Line 특성 목록을 검토하세요.

  • handle
  • id
  • original_price
  • tax_lines
  • title

TaxLine

Shopify Order Printer에서 사용할 수 있는 다음 Tax Line 특성 목록을 검토하세요.

  • price
  • rate
  • rate_percentage
  • title

Transaction

Shopify Order Printer에서 사용할 수 있는 다음 Transaction 특성 목록을 검토하세요.

  • amount
  • buyer_pending_payment_instructions
  • buyer_pending_payment_notice
  • created_at
  • gateway
  • gateway_display_name
  • id
  • kind
  • name
  • payment_details
  • receipt
  • show_buyer_pending_payment_instructions
  • status
  • status_label

Metafield

상위 개체에 연결된 메타 필드입니다. 특정 개체의 메타 필드에 액세스하는 방법에 대한 자세한 내용은 메타 필드 액세스를 참조합니다.

메타 필드는 여러 데이터 유형을 지원하여 메타 필드에 저장된 정보의 종류를 결정합니다. 메타 필드에 액세스하기 위해, 메타 필드의 액세스 경로는 두 계층으로 이루어져 있습니다.

  • 네임스페이스 - 충돌을 방지하기 위한 메타 필드의 그룹화입니다.
  • 키 - 메타 필드 이름입니다.

이를 감안했을 때, 다음 구문을 사용하여 메타 필드 개체에 액세스할 수 있습니다: {{ resource.metafields.namespace.key }}

이름 지정: <object>.metafields.<namespace>.<key>. 예를 들면 order.metafields.shipping.express_delivery_status과 같습니다.

형식:

  • String
  • Array - 인덱싱하기 위해 []를 사용합니다. 예: order.metafield.shipping.express_delivery_status[0]
  • Integer
  • Boolean
  • Date

참고 사항 Metaobject 유형은 지원되지 않습니다.

메타 필드를 지원하는 개체:

  • Order
  • Customer
  • Product
  • Variant
  • Location

Shopify Order Printer에서 사용할 수 있는 Liquid 필터

사용

출력에 필터를 적용하기 위해 출력의 중괄호 구분 기호 {{ }} 내에 필터 및 모든 필터 매개 변수를 추가하고 수직 막대 기호|를 앞에 놓습니다. 아래 예제에서 product가 개체, title이 해당 속성이며 upcase가 적용되는 필터입니다.

{{ product.title | upcase }}

product.titleHealth potion 값이 있는 경우 HEALTH POTIONupcase 필터에서 출력됩니다.

Liquid 필터 사용 방법에 대한 자세한 내용은 Shopify Themes Liquid 참조의 필터 섹션을 참조하세요.

Address 개체에 적용되는 필터

  • format_address

사용 예시를 보려면 format_address에 대한 Shopify Themes Liquid 문서를 참조하세요.

모든 텍스트/문자열에 적용되는 필터

  • camelcase
  • camelize
  • encode_url_component
  • format_code
  • handle
  • highlight
  • pad_spaces
  • paragraphize
  • pluralize
  • url_escape
  • url_param_escape

사용 예시를 보려면 문자열 필터에 대한 Shopify Themes Liquid 문서를 참조하세요.

금액을 의미하는 숫자에 적용되는 필터

  • money
  • money_with_currency
  • money_without_currency
  • money_without_trailing_zeros

Shopify Order Printer는 금액의 형식을 지정하기 위해 Shopify 관리자에서 구성된 이메일 알림 통화 서식 옵션을 사용합니다. 통화 서식을 변경할 수 있습니다. Shopify Order Printer에서 금액 필터 서식을 변경하려면 Shopify 관리자에서 Email with currencyEmail without currency 값을 설정하세요.

사용 예시를 보려면 금액 필터에 대한 Shopify Themes Liquid 문서를 참조하세요.

개체를 json으로 변환하는 데 적용되는 필터

  • json

사용 예시를 보려면 json 필터에 대한 Shopify Themes Liquid 문서를 참조하세요.

중량을 의미하는 숫자에 적용되는 필터

  • weight
  • weight_with_unit

사용 예시를 보려면 단위가 포함된 중량에 대한 Shopify Themes Liquid 문서를 참조하세요.

태그에 적용되는 필터

  • highlight_active_tag
  • link_to_add_tag
  • link_to_remove_tag
  • link_to_tag

사용 예시를 보려면 태그 필터에 대한 Shopify Themes Liquid 문서를 참조하세요.

URL에 적용되는 필터

  • article_img_url
  • asset_img_url
  • asset_url
  • cdn_asset_url
  • collection_img_url
  • file_img_url
  • file_url
  • global_asset_url
  • image_url
  • img_tag
  • img_url
  • link_to
  • payment_icon_png_url
  • payment_type_img_url
  • payment_type_svg_tag
  • placeholder_svg_tag
  • product_img_url
  • script_tag
  • shopify_asset_url
  • stylesheet_tag

사용 예시를 보려면 미디어html 필터에 대한 Shopify Themes Liquid 문서를 참조하세요.

컬렉션에 적용되는 필터

  • link_to_type
  • link_to_vendor
  • sort_by
  • url_for_type
  • url_for_vendor
  • within

사용 예시를 보려면 컬렉션 필터에 대한 Shopify Themes Liquid 문서를 참조하세요.

Shopify와 함께 사업을 시작할 준비가 되셨습니까?

무료 체험