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

# 從 Order Printer 匯入範本

> 貼上或上傳 Shopify Order Printer 或 Order Printer Pro 的範本，檢查 Foliant 轉換的內容，然後建立為新範本。

# 從 Order Printer 匯入範本

![從 Order Printer 匯入範本的對話方塊](https://mintcdn.com/foliant-dev/nnNby4-r9e5xN6eK/templates/images/import-from-order-printer.png?fit=max\&auto=format\&n=nnNby4-r9e5xN6eK\&q=85\&s=68121591400fb17c0e627e839faae0b9)

如果您要從 Shopify Order Printer 或 Order Printer Pro 轉移過來，可以將範本帶進 Foliant。貼上範本的程式碼或拖放範本檔案，Foliant 就會轉換不同的變數。儲存前，Foliant 會列出變更了什麼、移除了什麼，以及需要您處理的項目，並附上文件預覽。

匯入一律會建立新範本，絕不會覆寫您現有的範本。

## 開始之前

從您原本使用的應用程式複製範本程式碼，或將其儲存為檔案。匯入視窗中的**如何複製你的範本**連結會說明操作方式。

## 匯入範本

1. 前往**模板**，然後點選**匯入範本**。您也可以點選**模板設定**底部的**Import your templates**。
2. 在**從 Order Printer 匯入範本**中，您可以：
   * 將程式碼貼到**範本程式碼**，或
   * 將 `.liquid`、`.html` 或 `.txt` 檔案拖放到**或拖放 .liquid、.html 或 .txt 檔案**。
3. 在**匯入來源**中，保留**自動偵測**，或選擇 **Shopify Order Printer**、\*\*Order Printer（舊版）\*\*或 **Order Printer Pro**。
4. 在**文件**中，如果範本是**發票**、**折讓單**或**報價單**，請選擇對應項目，以便為文件編號。否則請保留**其他單據**。
5. 輸入**範本名稱**。如果留空，範本會命名為「Imported template」。拖放檔案時，會使用該檔案的名稱。
6. 點選**轉換**。

## 檢查轉換結果

Foliant 會在**以範例訂單預覽**旁顯示報告。

* 第一行會說明範本來自哪個應用程式，並顯示「Everything was converted.」或需要處理的項目數量。
* 變更會分類在**需要處理**、**變更內容**、**已移除**和**版面**之下，每項都會標示在您範本中的行號。

您常會看到的原因：

| 原因 | 代表意義 |
| - | - |
| Foliant has no such variable: it prints blank. | 此變數在 Foliant 中不存在。請在儲存後取代或移除。 |
| Probably this; check it prints the same, then change it. | Foliant 會建議最接近的對應項目。 |
| A storefront tag: documents can't use it. | 佈景主題標籤無法在文件中使用。 |
| A storefront filter: removed with what it printed. | 佈景主題篩選器已被移除。 |
| A snippet Foliant doesn't have. | 範本引用了 Foliant 找不到的程式碼片段。 |
| The page around the document was dropped; its styles were kept. | 只保留了文件本身。 |
| The page break at the end was dropped: documents start on a new page anyway. | 不需要任何操作。 |
| Foliant's date filter doesn't print this part of a date format. | 請檢查日期的列印方式。 |

如果範本目前還無法列印，預覽會顯示「It doesn't print yet: fix the items below after saving.」

點選**返回**即可修改範本程式碼或選項，然後重新轉換。

## 建立範本

1. 點選**建立模板**。Foliant 會顯示「Template imported」。
2. 新範本的設定頁面會開啟。請選擇範本預先選取的位置及接收對象。請參閱[範本設定](https://foliant-help.iforiti.com/zh-Hant/templates/template-settings.md)。
3. 開啟**編輯模板**，修正任何需要處理的項目。請參閱[編輯範本程式碼](https://foliant-help.iforiti.com/zh-Hant/template-editor/code-editor.md)。

## 注意事項

* 範本大小上限為 512 KB。檔案較大時會顯示「The template is larger than 512 KB.」
* 如果檔案不是文字範本，Foliant 會顯示「That file isn't a text template.」
* 如果在您檢查後到點選**建立模板**之間轉換結果有所變動，Foliant 會顯示新的轉換結果，並請您再次檢查。
* 匯入會以**已匯入**記錄在範本的版本紀錄中。請參閱[版本紀錄](https://foliant-help.iforiti.com/zh-Hant/templates/version-history.md)。
* 與所有新範本一樣，匯入的範本在您選擇之前，不會在任何地方預先選取。

## 相關文章

* [建立範本](https://foliant-help.iforiti.com/zh-Hant/templates/create-a-template.md)
* [範本設定](https://foliant-help.iforiti.com/zh-Hant/templates/template-settings.md)
* [編輯範本程式碼](https://foliant-help.iforiti.com/zh-Hant/template-editor/code-editor.md)
* [開始使用](https://foliant-help.iforiti.com/zh-Hant/getting-started.md)


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