# Order printerの受注明細に、割引クーポン名を表示させたい

**URL:** <https://community.shopify.com/t/order-printer/243539>\
**Category:** 技術的なQ＆A\
**Tags:** html\
**Created:** [August 24, 2023, 1:21am UTC](https://community.shopify.com/t/order-printer/243539 "2023-08-24T01:21:33Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![hayashi2023](https://avatars.discourse-cdn.com/v4/letter/h/45deac/32.png) [@hayashi2023](https://community.shopify.com/u/hayashi2023)\
**Post date:** [August 24, 2023, 1:21am UTC](https://community.shopify.com/t/order-printer/243539/1 "2023-08-24T01:21:33Z")

</div>

order printerで受注明細を印刷しています。

割引クーポン名またはクーポンコードを入れたいのですが、

```auto
{{ discount.code }} もしくは {{ discount.title }}

```

この２つを入力しても、表示されません。

どこが間違ってるのかご教授お願いいたします。

＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊＊

.printer-preview-content h1 { font-size: 140%; margin: 20px 0 0 0; } .printer-preview-content h2 { font-size: 100%; } .printer-preview-content h3 { font-size: 90%; } .printer-preview-content li{ list-style:none; } p { margin: 0; } header { display: flex; justify-content: space-between; border: solid 1px #000; } .header\_in { padding: 10px; } .order\_item { border: solid 1px #000; } .transactions { border: solid 1px #000; } .shop { padding: 10px; background-color: #dddddd; text-align: right; } table .item { width: 100%; } .printer-preview-content th { width: -webkit-fill-available; background-color: #eaeaea; } table,th,td { border: 1px solid #bbb; padding: 0 20px; } .order\_in { margin: 0 0 20px; border: solid 1px #000; } .billing ,.shipping { width: calc(100% / 2 - 10px); padding: 10px; border: solid 1px #000; } .pay { display: flex; margin: 0 0 10px; padding: 0 0 0 10px; border: solid 1px #000; } .address { display: flex; margin: 0 0 20px; justify-content: space-between; } .remarks { padding: 10px; border: solid 1px #000; }

ご注文日{{ processed\_at }}

ご注文番号{{ order\_name }}

ショップ：{{ shop\_name }}

〒{{ shop.zip | upcase }} {{ shop.province | replace: 'Aichi', '愛知県' | replace: 'Akita', '秋田 県' | replace: 'Aomori', '青森県' | replace: 'Chiba', '千葉県' | replace: 'Ehime', '愛 媛県' | replace: 'Fukui', '福井県' | replace: 'Fukuoka', '福岡県' | replace: 'Fukushima', '福島県' | replace: 'Gifu', '岐阜県' | replace: 'Gunma', '群馬県' | replace: 'Hiroshima', '広島県' | replace: 'Hokkaidō', '北海道' | replace: 'Hyōgo', '兵庫県' | replace: 'Ibaraki', '茨城県' | replace: 'Ishikawa', '石川県' | replace: 'Iwate', '岩手県' | replace: 'Kagawa', '香川県' | replace: 'Yamanashi', '山梨県' | replace: 'Yamaguchi', '山口県' | replace: 'Kōchi', '高知県' | replace: 'Kumamoto', '熊本県' | replace: 'Kyōto', '京都府' | replace: 'Mie', '三重県' | replace: 'Yamagata', '山形県' | replace: 'Miyazaki', '宮崎県' | replace: 'Nagano', '長野県' | replace: 'Nagasaki', '長崎県' | replace: 'Nara', '奈良県' | replace: 'Niigata', '新潟県' | replace: 'Ōita', '大分県' | replace: 'Okayama', '岡山県' | replace: 'Okinawa', '沖縄県' | replace: 'Ōsaka', '大阪府' | replace: 'Saga', '佐賀 県' | replace: 'Saitama', '埼玉県' | replace: 'Shiga', '滋賀県' | replace: 'Shimane', '島根県' | replace: 'Shizuoka', '静岡県' | replace: 'Tochigi', '栃木県' | replace: 'Tokushima', '徳島県' | replace: 'Tottori', '鳥取県' | replace: 'Toyama', '富山県' | replace: 'Tōkyō', '東京都' | replace: 'Miyagi', '宮城県' | replace: 'Wakayama', '和 歌山県' | replace: 'Kanagawa', '神奈川県' | replace: 'Kagoshima', '鹿児島県' }} {{ shop.city }} {{ shop.address }} {{ shop.address2 }}

# ご注文詳細

## 支払い方法
{% for transaction in transactions %} {% if transaction.status != "failure" and transaction.status != "error" %} {% if transaction.kind == "authorization" or transaction.kind == "sale" %} {% if transaction.payment\_details.credit\_card\_number %}

{{ transaction.gateway | payment\_method }}:{{ transaction.payment\_details.credit\_card\_company }}:{{ transaction.payment\_details.credit\_card\_number }}{% break %}

{% else %}

{{ transaction.gateway | payment\_method }}:{{ transaction.gateway }}{% break %}

{% endif %} {% endif %} {% endif %} {% endfor %}

{% for line\_item in line\_items %} {% endfor %}

| 商品名 | 数量 | 単価 （税込） |
| --- | --- | --- |
| {% if line\_item.sku != blank %}【{{ line\_item.sku }}】{% endif %} {{ line\_item.title }} | {{ line\_item.quantity }} | {{ line\_item.original\_price | money }} |

## お支払い内訳

| 割引コード{{ discount.title }} | {{ total\_discounts | money }} |
| （内消費税） | {{ tax\_price | money }} |
| 送料（税込） | {{ shipping\_price | money }} |
| 総合計（税込） | {{ total\_price | money }} {% if total\_paid != total\_price %} {% endif %} |

## 注文者

- {{ billing\_address | format\_address }} 
- {{ billing\_address.last\_name }}{{ billing\_address.first\_name }} 
- 電話番号：{{ billing\_address.phone }}

## お届け先
- {{ shipping\_address | format\_address }} 
- {{ shipping\_address.last\_name }}{{ shipping\_address.first\_name }} 
- 電話番号：{{ shipping\_address.phone }}

## 備考
{{ note }}

{{ shipping\_method.title }} {% for attribute in attributes %} {% if attribute.first == "配送希望日" %}
### {{ attribute | first }}

{{ attribute | last }}

{% endif %} {% endfor %} {% for attribute in attributes %} {% if attribute.first == "配送希望時間" %}
### {{ attribute | first }}

{{ attribute | last }}

{% endif %} {% endfor %}

---

_[View the full topic](https://community.shopify.com/t/order-printer/243539)._
