Order printerに関して

Topic summary

問題の概要:
Order printerアプリでバッチ印刷時に、ランダムなオーダーが2ページに分割されて印刷される不具合が発生。単体でオーダーを印刷する場合は正常に1ページに収まる。

提供された情報:

  • Order printerのテンプレートコードが投稿されている
  • コードには注文番号、注文日時、配送先情報、注文者情報、配送方法/料金、合計金額、注文指定日などの表示項目が含まれる
  • CSSスタイリングとLiquidテンプレート構文が使用されている
  • 返金処理や明細行の処理ロジックも実装されている

現状:
議論は問題提起とコード共有の段階で、解決策や原因の特定には至っていない。バッチ印刷時の改ページ制御に関する技術的な問題と思われる。

Summarized with AI on November 18. AI used: claude-sonnet-4-5-20250929.

現在Shopify appのOrder printerを使って出荷用の伝票を印刷していますが、バッチで複数のオーダーを同時に印刷する際に、ランダムなオーダーにて注文が1ページに表示されずに、2ページに分かれて印刷されてしまうことがあります。

オーダー自体を単体で選択肢印刷すると通常通り一枚に印刷されすのですがこれを修正する方法は有りますでしょうか?

下記がOrder printerの表示内容のコードです。

{% assign total_refunds = 0.0 %} {% for transaction in refund_transactions %} {% if transaction.status == "success" %} {% assign total_refunds = total_refunds | plus: transaction.amount %} {% endif %} {% endfor %}
注文番号 {{ order_name }}
注文日時 {{ created_at }}
配送先情報 〒{{ shipping_address.zip | upcase }}
{{ shipping_address.province }}{{ shipping_address.city }}{{ shipping_address.street }}
{% if shipping_address.company %}{{ shipping_address.company }}
{% endif %} {{ shipping_address.phone }}
{{ shipping_address.name }}
注文者情報 〒{{ billing_address.zip | upcase }}
{{ billing_address.province }}{{ billing_address.city }}{{ billing_address.street }}
{% if billing_address.company %}{{ billing_address.company }}
{% endif %} {{ billing_address.phone }}
{{ billing_address.name }}
配送方法 / 配送料 {{ shipping_method.title }} / {{ shipping_price | money }}
注文合計金額(送料別){{ subtotal_price | minus: total_refunds | money }}
注文指定日 {% if attributes.uchuyayamatodatepicker %}{{ attributes.uchuyayamatodatepicker }}{% else %}---{% endif %}
注文指定時間 {% if attributes.uchuyayamatoshippingtime %}{{ attributes.uchuyayamatoshippingtime }}{% else %}---{% endif %}
注文備考 {% if note %}{{ note }}{% else %}---{% endif %}

商品情報

{% assign refunded_items = "" %} {% for refund in refunds %} {% for refund_line_item in refund.refund_line_items %} {% assign refunded_items = refunded_items | append: refund_line_item.line_item_id | append: ':' | append: refund_line_item.quantity | append: ','%} {% endfor %} {% endfor %} {% assign refunded_items_array = refunded_items | split: ',' %}

{% for line_item in line_items %}

{% assign non_refunded_quantity = line_item.quantity %}
{% assign line_item_id = line_item.id | append: ‘’ %}
{% if refunded_items contains line_item_id %}
{% for refunded_item in refunded_items_array %}
{% assign split_refunded_item = refunded_item | split: ‘:’%}
{% if split_refunded_item.first == line_item_id %}
{% assign non_refunded_quantity = line_item.quantity | minus: split_refunded_item.last %}
{% endif %}
{% endfor %}
{% endif %}
{% if non_refunded_quantity == 0 %}{% continue %}{% endif %}

{% endfor %}
JAN 商品 / 単価 数量 熨斗
{{ line_item.sku }} {{ line_item.title }}
{% if line_item.original_price != line_item.price %}{{ line_item.original_price | money }} {% endif %} {{ line_item.price | money }}
{{ non_refunded_quantity }} {% for property in line_item.properties %}{{ property.first }}: {{ property.last }}
{% endfor %}
h2.title { font-size: 16px; font-weight: bold; color: #000; line-height: 1.2; margin: 0; padding: 10px 0; } .order_info, .picking_info { width: 100% !important; border-top: 1px solid #999 !important; border-left: 1px solid #999 !important; box-sizing: border-box; margin: 0 0 10px 0; } .order_info th, .picking_info th { border-bottom: 1px solid #999 !important; border-right: 1px solid #999 !important; padding: 10px; font-size: 13px; line-height: 1.5; color: #000; box-sizing: border-box; font-weight: bold; text-align: center; } .order_info td, .picking_info td { border-bottom: 1px solid #999 !important; border-right: 1px solid #999 !important; padding: 10px; font-size: 13px; line-height: 1.5; color: #000; box-sizing: border-box; } .order_info td:nth-child(odd) { width: 24%; } .order_info td:nth-child(even) { width: 76%; } .picking_info th:nth-child(1) { width: 24%; } .picking_info th:nth-child(2) { width: 32%; } .picking_info th:nth-child(3) { width: 10%; } .picking_info th:nth-child(4) { width: 34%; } .order_info td b { font-size: 16px; font-weight: bold; letter-spacing: 1px; }