> ## 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.

# 商品選項應用程式（Bold、Infinite Options）

> Foliant 如何列印顧客透過 Bold Product Options、Infinite Options 和類似應用程式選擇的選項，以及這些選項的付費加購項目。

**Bold Product Options** 和 **Infinite Options** 等應用程式能讓顧客將商品個人化，例如刻字、尺寸、禮品留言。Foliant 會在每個內建範本中，將這些選擇列印在品項下方。當某個選項需要額外付費（例如禮品包裝、刻字費用），應用程式會將它以獨立的一行加入訂單。Foliant 會將它列印在所屬品項下方，讓您的文件看起來就像顧客的訂單，而不是一串隱藏商品清單。

不需要安裝或連結任何項目：Foliant 會自動辨識這兩個應用程式的訂單。

## 列印內容

以發票為例：

> **T 恤**
> Engraving: Hello
> \+ Gift wrap: \$5.00

* 顧客的選擇會以 **名稱: 值** 的格式列印在品項下方。
* 每個付費加購項目會以 **+ 禮品包裝** 的格式列印在所屬品項下方；在顯示價格的文件上會附上價格。裝箱單上則不顯示價格。
* 加購項目不會再另外列為一個品項，您的總計金額也不會改變。
* 應用程式自行保留的值（名稱以 `_` 開頭）一律不會列印。

## 改為將加購項目列為獨立的行

\*\*程式碼編輯器中的內建範本：\*\*在範本開頭附近，將

```
{% assign SETTING_option_addons = "under_item" %}
```

改為 `"separate"`。這樣加購項目就會像在 Shopify 中一樣列為品項。

\*\*視覺化編輯器：\*\*選取 **品項** 區塊，在 **列** 下方取消勾選 **商品選項加購項目顯示在所屬品項下方（Bold、Infinite Options）**。

![視覺化編輯器中品項區塊的列設定](https://mintcdn.com/foliant-dev/AoWxppgqeHqT1nDZ/templates/images/product-options-apps.png?fit=max\&auto=format\&n=AoWxppgqeHqT1nDZ\&q=85\&s=94213079f927ed94701cee39e768b8a3)

\*\*設計：\*\*設計會將加購項目併入所屬品項：品項價格包含加購項目的價格，加購項目名稱則顯示在品項下方。

## 在您自己的 Liquid 中

除了 Order Printer Pro 提供的所有欄位外，每個品項還有以下額外欄位：

| 欄位 | 內容 |
| - | - |
| `line_item.options` | 顧客的選擇，每個都有 `name` 和 `value`。 |
| `line_item.option_addon` | 當這一行是另一個品項的付費加購項目時為 `true`。 |
| `line_item.option_addons` | 此品項的加購項目，以品項形式提供。 |
| `line_item.price_with_addons` | 品項價格加上其加購項目的價格。 |
| `line_item.line_price_with_addons` | 該行總計加上其加購項目的金額。 |

若要在您自己的迴圈中略過加購項目的行，並將它們列印在所屬品項下方：

```
{% for line_item in line_items %}
  {% if line_item.option_addon %}{% continue %}{% endif %}
  {{ line_item.title }}
  {% for addon in line_item.option_addons %}
    + {{ addon.title }}: {{ addon.final_line_price | money }}
  {% endfor %}
{% endfor %}
```

## 在出貨電子郵件中

在電子郵件範本的 **此貨件中的商品** 區塊中，**商品選項（來自 Bold、Infinite Options…）** 會在每個品項下方以 **名稱: 值** 的格式顯示顧客的選擇。此選項預設為開啟。付費加購項目在電子郵件中會列為獨立的品項，與 Shopify 的顯示方式相同。請參閱 [編輯電子郵件範本](https://foliant-help.iforiti.com/zh-Hant/email-templates/edit-an-email-template.md)。

## 小提醒

* 其他會將顧客選擇儲存在訂單上的商品選項應用程式，也會以 **名稱: 值** 的格式列印在品項下方。只有 Bold Product Options 和 Infinite Options 的加購項目會併入所屬品項下方。
* [訂單資料匯出](https://foliant-help.iforiti.com/zh-Hant/exports/export-order-data.md)中有 **商品選項（屬性）** 欄位，包含相同的選擇。

## 相關文章

* [編輯器總覽](https://foliant-help.iforiti.com/zh-Hant/template-editor/editor-overview.md)
* [匯出訂單資料](https://foliant-help.iforiti.com/zh-Hant/exports/export-order-data.md)
* [範本中的商品項目](https://foliant-help.iforiti.com/zh-Hant/template-editor/liquid-line-items.md)
* [編輯電子郵件範本](https://foliant-help.iforiti.com/zh-Hant/email-templates/edit-an-email-template.md)


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