Getting discounted price to show in line item

Getting discounted price to show in line item

Poppy_Ng
Visitor
1 0 0

How can I get the discounted price to show in the line item in my invoice ?

Please see snippet from my order template: 

<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<thead>
<tr>
<th>Qty</th>
<th>Image</th>
<th>Item</th>
{% if show_line_item_taxes %}
<th>Taxes</th>
{% endif %}
<th>Price</th>
</tr>
</thead>
<tbody>
{% for line_item in line_items %}
<tr>
<td><strong>
{% if line_item.quantity > 1 %}
<span style="color:red;background-color:#ffff00;font-weight:bold">{{ line_item.quantity }}</span>
{% else %}
{{ line_item.quantity }}
{% endif %} x</strong></td>

<td>{{ line_item.image | img_url: 'small' | img_tag }}</td>
<td><b>{{ line_item.title }}</b>
{% for property in line_item.properties %}
{% if property.first contains '_io_' %}{% continue %}{% endif %}
<br>{{ property.first }}: {{ property.last }} {% endfor %}
</td>
{% if line_item.tax_lines %}
<td>
{% for tax_line in line_item.tax_lines %}
{{ tax_line.price | money }} {{ tax_line.title }}<br/>
{% endfor %}
</td>
{% endif %}
<td>

{% if line_item.original_price != line_item.price %}
<s>{{ line_item.original_price | money }}</s>
{% endif %}
{{ line_item.price | money }}

</td>
</tr>
{% endfor %}
</tbody>
</table>

Reply 1 (1)

marchajj
Excursionist
18 0 3

I have the same problem, I checked this article: https://shopify.dev/api/liquid/objects/order#order-discount_applications and all variables are wrong I cannot display the price of the items in the order after applying a certain discount via promo code!!! 😞 live chat didn't help too.