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

# 測試訂單會使用哪個範本

> 使用「以訂單測試」查看訂單會以哪個範本列印，以及每個替代範本為何符合或不符合該訂單。

# 測試訂單會使用哪個範本

當某些訂單會改用特定範本取代其他範本時，**以訂單測試**會顯示實際訂單使用哪個範本，以及原因。建議您在正式依賴條件之前，先用它檢查條件是否正確。

## 開始之前

您至少需要一個用來取代其他範本的範本。如果沒有，測試會顯示「尚未有任何範本用來取代其他範本。請先設定一個。」請參閱[僅對部分訂單使用範本](https://foliant-help.iforiti.com/zh-Hant/templates/who-gets-this-template.md)。

## 測試訂單

1. 在以下任一位置開啟**以訂單測試**：
   * 在**模板**頁面的**自動選擇合適的範本**區段。
   * 在範本的設定頁面，\*\*誰使用此範本？\*\*底下。請先儲存所有變更：當您有未儲存的設定時，此按鈕會停用。
2. 在**列印時**中，選擇您要列印的範本。清單只會列出有其他範本可替代的範本。
3. 在**訂單編號**中，輸入訂單的編號，例如 #1001。
4. 點擊**測試**。

## 查看結果

結果會顯示訂單使用哪個範本：

* 「#1001 以 Wholesale invoice 列印，而非 Receipt / Invoice。」表示有替代範本符合該訂單。
* 「#1001 以 Receipt / Invoice 列印：沒有符合的替代範本。」表示沒有任何替代範本符合，因此會列印原本的範本。

結果下方會依 Foliant 嘗試的順序列出每個替代範本（「依此順序嘗試；第一個符合的範本優先。」），並標示為**符合**或**不符合**。每個條件都會顯示該條件的要求以及訂單的實際內容，例如「運送國家/地區：加拿大」和「此訂單：美國」。這樣您就能確切知道哪個條件不相符。

如果找不到該訂單編號，測試會顯示「找不到訂單 #1001。」

## 相關文章

* [僅對部分訂單使用範本](https://foliant-help.iforiti.com/zh-Hant/templates/who-gets-this-template.md)
* [自動選擇合適的範本](https://foliant-help.iforiti.com/zh-Hant/templates/automatic-template-choices.md)


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