# カートで納品書の同梱有無を選択できるチェックボックスを表示したい

**URL:** <https://community.shopify.com/t/topic/234976>\
**Category:** 技術的なQ＆A\
**Created:** [July 23, 2023, 9:51am UTC](https://community.shopify.com/t/topic/234976 "2023-07-23T09:51:49Z")\
**Posts on this page:** 4\
**Page:** 1

## AI-generated summary

顧客が注文確認ページで納品書の同梱希望をチェックボックスで選択できる機能の実装方法についての質問です。

**提案された解決策:**
- Shopifyの「cart attributes」機能を使用することで実装可能
- UI Elements Generatorを使ってチェックボックスのHTMLコードを生成
- 生成されたコードをテーマのカートページファイル（Dawnテーマの場合はmain-cart-items.liquid）の`<form>`タグ内に追加
- これにより注文ページでチェックボックスの結果を確認できる

**現在の状況:**
質問者はHTMLコード生成までは完了したが、main-cart-items.liquidファイルの具体的にどの行・どの位置の`<form>`タグ内に追加すべきか、詳細な手順について追加の質問をしている段階です。実装の最終ステップで具体的な挿入場所の確認を求めています。

<div class="post-metadata">

**Author:** ![the\_1](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@the\_1](https://community.shopify.com/u/the_1)\
**Post date:** [July 23, 2023, 9:51am UTC](https://community.shopify.com/t/topic/234976/1 "2023-07-23T09:51:49Z")

</div>

お客様に購入いただいた後、注文確認ページで、納品書の同梱を希望するかどうかチェックボックス形式で意思表示してもらえるようにしたいです。

テーマ等、どの部分をどのように編集すれば良いでしょうか？

---

<div class="post-metadata">

**Author:** ![Anonymous\_44fbe07fc59d9ccaacd70575fd5a5155](https://yyz1.discourse-cdn.com/shopifyforum/user_avatar/community.shopify.com/anonymous_44fbe07fc59d9ccaacd70575fd5a5155/32/194200_2.png) [@Anonymous\_44fbe07fc59d9ccaacd70575fd5a5155](https://community.shopify.com/u/Anonymous_44fbe07fc59d9ccaacd70575fd5a5155)\
**Post date:** [July 24, 2023, 9:29am UTC](https://community.shopify.com/t/topic/234976/2 "2023-07-24T09:29:01Z")

</div>

The–様

ご質問を確認いたしました。

いただいた内容ですが、shopifyの機能である「cart attributes」を使用すれば実装可能です。

[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)

具体的には以下のURLより、作成されたいチェックボックスの設定をします。

[https://ui-elements-generator.myshopify.com/pages/cart-attribute](https://ui-elements-generator.myshopify.com/pages/cart-attribute)

 ![screencapture-ui-elements-generator-myshopify-pages-cart-attribute-2023-07-24-18_22_11.png](https://canada1.discourse-cdn.com/shopifyforum/original/4X/0/0/9/0092b9428d4b3e98fa672e9110178722d8ab5ee9.png)

上記にて生成されたhtmlコードを、ご使用されているテーマのカートページを表示するファイル(Dawnの場合、main-cart-items.liquid)のタグ内に添付することで機能の実装が可能になります。

以上で、注文ページよりチェックボックスの結果を確認できるようになります。

ご参考までに。

私たちの励みにもなりますので、 お役に立てていればBest Answerボタンを押して頂ければ嬉しいです。

分からない点があれば、またいつでもご連絡ください。

フルバランス 園畑

---

<div class="post-metadata">

**Author:** ![the\_1](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@the\_1](https://community.shopify.com/u/the_1)\
**Post date:** [July 30, 2023, 5:26am UTC](https://community.shopify.com/t/topic/234976/3 "2023-07-30T05:26:18Z")

</div>

ご教示いただきありがとうございます。  
cart  
attributesで作成したいチェックボックスのhtmlコードを生成するところまではできたのですが、main-cart-items.liquid)の （４９行目？）のタグ内のどこにどのように添付すれば良いか教えていただけませんでしょうか？

---

<div class="post-metadata">

**Author:** ![the\_1](https://avatars.discourse-cdn.com/v4/letter/t/73ab20/32.png) [@the\_1](https://community.shopify.com/u/the_1)\
**Post date:** [August 6, 2023, 6:41am UTC](https://community.shopify.com/t/topic/234976/4 "2023-08-06T06:41:54Z")

</div>

すみません、上記で質問させていただいたmain-cart-items.liquid)のタグ内のどこに（何行目）に添付すれば良いか回答いただけるとたいへん幸いです。
