How can I show the true subtotal before discounts in Order Printer?

Topic summary

A Shopify merchant is struggling with the Order Printer app’s default template, which displays the subtotal after discounts are applied rather than showing the original retail price first, then the discount separately.

The Issue:

  • When customers use discount codes or automatic discounts, the subtotal shows the reduced amount ($179.00) instead of the original price ($229.00)
  • The merchant wants to display: original subtotal → discount → final total
  • This affects both custom discounts and automatic promotions

Proposed Solution:

  • A user (Mishkananda) provided Liquid code modifications in both Spanish and English
  • The solution includes custom invoice templates with modified payment details sections
  • However, the posted code appears partially corrupted or reversed in the formatting, making it difficult to verify the exact implementation

Status: A potential solution has been shared, though the code formatting issues may require clarification for proper implementation.

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

The default template of Order Printer is not showing the true subtotal of the items in this order. This order is a retail cost of $229.00 BEFORE the discount is applied. I want the Subtotal Price to be be $229.00 and THEN show the discount. Please help me edit the liquid so I can get the TRUE subtotal before discounts.

This example picture is of a custom discount, but the same thing happens when a customer uses a coupon or an automatic discount is applied. The Subtotal does not show the TRUE retail total of the items. The Liquid code below is the default.

Here is a copy of the default liquid starting at “Payment Details”.

1 Like

My dear Brokenalice,

Here is the solution, in Spanish and in English.

Years waiting for a solution, hope Shopify brings me a gift or th universe.

For Spanish

This code:

Fecha Factura:{{ date | date: "%d/%m/%Y" }}
Factura numero {{ order_name }}

{{ shop_name }}

{{ shop.address }}
{{ shop.city }} {{ shop.province_code }} {{ shop.zip | upcase }}
{{ shop.country }}
VAT: ESX2900430S
Nombre: ROKSOLANA KISHCHUK
Cuenta Bancaria: ES30 0182 1078 8702 0154 7056
BIZUM: 607656851

Item Details

{% if show_line_item_taxes %} {% endif %} {% for line_item in line_items %} {% if show_line_item_taxes %} {% endif %} {% if line_item.tax_lines %} {% endif %} {% endfor %}
Articulo CantidadPrecio UnitarioPrecio Total
{{ line_item.title }} {{ line_item.quantity }} x {{ line_item.price | money }} {% for tax_line in line_item.tax_lines %} {{ line_item.price | times: line_item.quantity | money }} {{ tax_line.title }}
{% endfor %}
{% assign subtotal_before_tax = subtotal_before_tax | plus: line_item.price | minus: tax_line.price %}

{% if transactions.size > 1 %}

Transaction Details

{% for transaction in transactions %} {% endfor %}
Type Amount Kind Status
{{ transaction.gateway | payment_method }} {{ transaction.amount | money }} {{ transaction.kind }} {{ transaction.status }}
{% endif %}

Payment Details

{%- comment -%} Modified by Ryan A at Shopify on October 7 2021 {%- endcomment -%}

{%- comment -%} End of changes by Ryan A at Shopify {%- endcomment -%} {% for discount in discounts %} {% endfor %} {% if shipping_address %} {% endif %} {% if total_paid != total_price %} {% endif %}
Precio Subtotal: {{ total_price | minus: discounts_savings | money}}
Descuentos Incluidos: "{{ discount.code }}" {{ discount.savings | money }}
Costo de envio: {{ shipping_price | money }}
Impuestos totales Incluidos: {{ tax_price | money }}
Precio Total: {{ total_price | money }}
Precio Pagado: {{ total_paid | money }}
Outstanding Amount: {{ total_price | minus: total_paid | money }}

{% if note %}

Note

{{ note }}

{% endif %}

{% if shipping_address %}

Shipping Details

{{ shipping_address.name }}
{{ shipping_address | format_address }}
{% endif %}

Si tiene alguna consulta, por favor envie un mail a {{ shop.email }}

For English

This Code:


{{ transaction.date | "%d/%m/%y" }}
Invoice for {{ order_name }}

{{ shop_name }}

{{ shop.address }}
{{ shop.city }} {{ shop.province_code }} {{ shop.zip | upcase }}
{{ shop.country }}

Item Details

{% if show_line_item_taxes %} {% endif %} {% for line_item in line_items %} {% if show_line_item_taxes %} {% endif %} {% if line_item.tax_lines %} {% endif %} {% endfor %}
Item QuantityUnit PriceTotal Price
{{ line_item.title }} {{ line_item.quantity }} x {{ line_item.price | money }} {% for tax_line in line_item.tax_lines %} {{ line_item.price | times: line_item.quantity | money }} {{ tax_line.title }}
{% endfor %}
{% assign subtotal_before_tax = subtotal_before_tax | plus: line_item.price | minus: tax_line.price %}

{% if transactions.size > 1 %}

Transaction Details

{% for transaction in transactions %} {% endfor %}
Type Amount Kind Status
{{ transaction.gateway | payment_method }} {{ transaction.amount | money }} {{ transaction.kind }} {{ transaction.status }}
{% endif %}

Payment Details

{%- comment -%} Modified by Ryan A at Shopify on October 7 2021 {%- endcomment -%}

{%- comment -%} End of changes by Ryan A at Shopify {%- endcomment -%} {% for discount in discounts %} {% endfor %} {% if shipping_address %} {% endif %} {% if total_paid != total_price %} {% endif %}
Subtotal price: {{ total_price | minus: discounts_savings | money}}
Includes discount "{{ discount.code }}" {{ discount.savings | money }}
Shipping: {{ shipping_price | money }}
Total tax included: {{ tax_price | money }}
Total price: {{ total_price | money }}
Total paid: {{ total_paid | money }}
Outstanding Amount: {{ total_price | minus: total_paid | money }}

{% if note %}

Note

{{ note }}

{% endif %}

{% if shipping_address %}

Shipping Details

{{ shipping_address.name }}
{{ shipping_address | format_address }}
{% endif %}

If you have any questions, please send an email to {{ shop.email }}