# Order Printerのテンプレート編集について

**URL:** <https://community.shopify.com/t/order-printer/263724>\
**Category:** Shopify アプリ\
**Created:** [October 30, 2023, 7:56am UTC](https://community.shopify.com/t/order-printer/263724 "2023-10-30T07:56:18Z")\
**Posts on this page:** 4\
**Page:** 1

## AI-generated summary

目的: 定期購買アプリのプラン日数をOrder Printerの納品書テンプレートに動的表示したい。

最新の進展: アプリ提供元は「Liquidのselling_planオブジェクトから取得可能」と回答。Order Printerでselling_plan値を参照できるかはShopifyサポートから明確な返答なし。添付のスクリーンショットは出力箇所（赤線）を示す参考。

検討案:
- Order Printer側で利用可能なLiquid変数を現行仕様で確認し、selling_planを直接参照できるか検証。
- Shopify Flowを用い、product/variant配下のselling_plan情報に到達できれば取得・転記を試行。
- 代替: 商品メタフィールドに日数を登録し、Order Printerでメタフィールドを出力。
- 代替: 商品ページ/カートでselling_planを取得しLine Item Propertiesに格納→Order Printerで出力（Flow不要の可能性）。

用語補足: selling_plan=サブスクの購買プラン情報(Liquidオブジェクト)。Line Item Properties=各注文明細に付ける任意属性。メタフィールド=商品等に紐づく拡張フィールド。

結論/状況: 直接の実装手段は未確定で、解決は未了。次アクションはOrder Printerの変数確認と、メタフィールド/Line Item Propertiesを使う迂回案の検証。

<div class="post-metadata">

**Author:** ![STUDIO1115](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@STUDIO1115](https://community.shopify.com/u/STUDIO1115)\
**Post date:** [October 30, 2023, 7:56am UTC](https://community.shopify.com/t/order-printer/263724/1 "2023-10-30T07:56:18Z")

</div>

定期購買アプリ（ [https://apps.shopify.com/huckleberry-subscription?locale=ja](https://apps.shopify.com/huckleberry-subscription?locale=ja) ）で購入したユーザーの納品書へ、定期購買アプリで作成したプラン日数を動的に表示させる方法があればご教示いただけないでしょうか。

私個人としては、添付ファイルの赤線部分を変数で持ってこれれば可能ではないかと考えているのですが、Order Printerの変数で対応可能でしょうか？

また、order printerでは定期プランの日数を納品書に動的に入れることが難しければ、別の納品書アプリで対応可能などございましたらご教示いただけますと幸いです。  
お忙しい中恐れ入りますが、何卒よろしくお願い申し上げます。

 ![スクリーンショット (57).png](https://canada1.discourse-cdn.com/shopifyforum/original/3X/6/2/62e3ea67f8e381626590541aa0d41ab1341b0e6d.png)

---

<div class="post-metadata">

**Author:** ![Jizo\_Inagaki](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/jizo_inagaki/32/149480_2.png) [@Jizo\_Inagaki](https://community.shopify.com/u/Jizo_Inagaki)\
**Post date:** [November 6, 2023, 7:41am UTC](https://community.shopify.com/t/order-printer/263724/2 "2023-11-06T07:41:36Z")

</div>

定期購買アプリは開発は日本の会社なので、ドキュメントを確認したり直接質問された方がよいと思います。

Shopify Flowの利用も視野に入れると実現可能性が高まるかもとは思いますが、何らかの方法が用意されているかもしれませんので。

---

<div class="post-metadata">

**Author:** ![STUDIO1115](https://avatars.discourse-cdn.com/v4/letter/s/e274bd/32.png) [@STUDIO1115](https://community.shopify.com/u/STUDIO1115)\
**Post date:** [November 6, 2023, 7:49am UTC](https://community.shopify.com/t/order-printer/263724/3 "2023-11-06T07:49:54Z")

</div>

ご回答ありがとうございます。

定期購買アプリに直接問い合わせたところ、以下の回答でした。

> 恐れ入りますが、他社アプリの詳細仕様がわからないため、具体的なことはお答えできかねるのですが、\> 添付ファイルの赤線部分を含む定期購買関連の情報は、Liquidのselling\_planというオブジェクトからが取得できます。\> Order Printer側でselling planの値を取得できれば、Order Printerで作成する納品書にご希望の情報が載せられるかと存じます。\> [https://shopify.dev/docs/apps/selling-strategies/subscriptions/selling-plans](https://shopify.dev/docs/apps/selling-strategies/subscriptions/selling-plans)また、shopifyのサポートへselling planの値を取得できるorder printerの変数はあるのか問い合わせましたが、明確な回答はいただけませんでした。

Jizo\_Inagakiさまの方でこちらの2点の知見をお持ちでしたら方法をご教示いただけないでしょうか？

①selling planの値を取得できる方法  
②shopify flowでの取得

何卒よろしくお願い申し上げます。

---

<div class="post-metadata">

**Author:** ![Jizo\_Inagaki](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/jizo_inagaki/32/149480_2.png) [@Jizo\_Inagaki](https://community.shopify.com/u/Jizo_Inagaki)\
**Post date:** [November 6, 2023, 11:15am UTC](https://community.shopify.com/t/order-printer/263724/4 "2023-11-06T11:15:43Z")

</div>

最近Shopify Flowを触っていないのと該当する要素を扱った経験がないため特に情報は持っておらず、以下程度の回答となります。

①selling planの値を取得できる方法

[https://webutubutu.com/webdesign/9823](https://webutubutu.com/webdesign/9823)

上記は私のブログ記事ですが古いため今とは違う可能性があり、ご自身で現在の内容を確認した上で、値が取れるかどうかを検討いただければと思います。

確か管理画面から上記のような使用可能な変数が確認できたと思います。

②Shopify flowでの取得

組み方次第なので何ともいえませんが、商品情報配下のselling\_planで必要な値が取れるのであれば、productやvariantまで辿り着ければ取得できるかなと思います。

[https://shopify.dev/docs/api/liquid/objects/product#product-selling\_plan\_groups](https://shopify.dev/docs/api/liquid/objects/product#product-selling_plan_groups)

[https://shopify.dev/docs/api/liquid/objects/selling\_plan](https://shopify.dev/docs/api/liquid/objects/selling_plan)

■別案

1. 手動で商品のメタフィールドに日数を入力
2. Order Printerで商品のメタフィールドまで辿って前項の入力値を出力

一手間かかりますが、上記のようにメタフィールドにも同じ値をいれてしまえば扱いやすくなるはずです。

仮にShopify Flowを使う場合は、自動で上記(またはメタフィールドではなくLine Item Properties)に値をどうにかしていれようという意図で組むことになるかなと思います。

Line Item Propertiesに関してもう少し考えを進めると、商品詳細やカート画面でselling\_planを取得してLine Item Propertiesに入れてしまえば、Shopify Flowも不要になるのかもしれません。

[参考]

[https://community.shopify.com/topic/1645132](https://community.shopify.com/topic/1645132)

[https://community.shopify.com/topic/957897](https://community.shopify.com/topic/957897)

[https://www.shopify.com/jp/blog/partner-shopify-theme-customize-cart-attributes-line-item-property-customer-note](https://www.shopify.com/jp/blog/partner-shopify-theme-customize-cart-attributes-line-item-property-customer-note)

[https://community.shopify.com/post/1027544](https://community.shopify.com/post/1027544)

以上ですが、結局のところ工夫次第のように思います。
