> ## 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 が異なる変数を変換します。保存する前に、変更した内容、削除した内容、対応が必要な項目が、ドキュメントのプレビューとともに表示されます。

インポートすると、常に新しいテンプレートが作成されます。既存のテンプレートが上書きされることはありません。

## 始める前に

移行元のアプリでテンプレートのコードをコピーするか、ファイルとして保存してください。手順は、インポート画面の **テンプレートのコピー方法** リンクで確認できます。

## テンプレートをインポートする

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. **変換** をクリックします。

## 変換内容を確認する

**サンプル注文でプレビュー** の横にレポートが表示されます。

* 1 行目には、テンプレートの移行元のアプリと、「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. **テンプレートを作成** をクリックします。「Template imported」と表示されます。
2. 新しいテンプレートの設定ページが開きます。事前選択する場所と送信先を選択します。詳しくは [テンプレート設定](https://foliant-help.iforiti.com/jp/templates/template-settings.md) をご覧ください。
3. **テンプレートを編集** を開き、対応が必要な項目を修正します。詳しくは [テンプレートのコードを編集する](https://foliant-help.iforiti.com/jp/template-editor/code-editor.md) をご覧ください。

## 補足

* テンプレートのサイズ上限は 512 KB です。これより大きいファイルの場合、「The template is larger than 512 KB.」と表示されます。
* ファイルがテキストのテンプレートでない場合、「That file isn't a text template.」と表示されます。
* 確認してから **テンプレートを作成** をクリックするまでの間に変換結果が変わった場合、新しい変換結果が表示され、再確認を求められます。
* インポートは、テンプレートのバージョン履歴に **インポート** として記録されます。詳しくは [バージョン履歴](https://foliant-help.iforiti.com/jp/templates/version-history.md) をご覧ください。
* ほかの新しいテンプレートと同様に、インポートしたテンプレートは、選択するまでどこにも事前選択されません。

## 関連記事

* [テンプレートを作成する](https://foliant-help.iforiti.com/jp/templates/create-a-template.md)
* [テンプレート設定](https://foliant-help.iforiti.com/jp/templates/template-settings.md)
* [テンプレートのコードを編集する](https://foliant-help.iforiti.com/jp/template-editor/code-editor.md)
* [はじめに](https://foliant-help.iforiti.com/jp/getting-started.md)


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