Order Printer - need help with discount coding!

Highlighted
Tourist
10 0 2

I am running a Black Friday sale and I use the Order Printer app to print a customer receipt that I send with the shipped parcel. I am unable to code anything that will display any product discount prices, discount title, discount percentage, etc. I do not write code but I am usually able to make small edits to the order template to do what I want but I have failed to get any discount info to display. The discount in my store is an automated discount that I have called 'Black Friday' and its a 10% discount on 66 of my collections. I would like to be able to display the automated discount title, the percentage of discount and the reduced each price of the product after the 10% discount. I'd also like to display the total amount saved for the entire order so people can see how much they saved.

 

Here is my order printer code:

<p style="float: right; text-align: right; margin: 0;">
<span style="font-size:22px"><strong>Order {{ order_name }}</strong></span><br />
<br /><br />Ordered: {{ created_at | date: "%b %d, %Y"}}<br /><br />Fulfilled: {{ "now" | date: "%b %d, %Y"}}

</p>

<div style="float: left; margin: 0 0 1.5em 0;">
<img align="center" alt="" src="https://cdn.shopify.com/s/files/1/1023/7667/files/Sounding_Stone_Logo_Quickbooks.jpg?169650473348960..."
width="500" style="max-width: 380px;padding-bottom: 0;display: inline !important;vertical-align: bottom;border: 0;
height: auto;outline: none;text-decoration: none">
</div>
<hr/>

<p style="width: 250px; float: left; margin: 0 0 1em 00; padding: 1em;">
<strong>Bill To:</strong><br/>
{{ billing_address.name }}<br/>
{% if billing_address.company %}
{{ billing_address.company }}<br/>
{% endif %}
{% if billing_address.address2 %}
{{ billing_address.address2 }} - {{ billing_address.address1 }}<br/>
{% else %}
{{ billing_address.address1 }}<br/>
{% endif %}
{{ billing_address.city }},
{{ billing_address.province_code }}<br/>
{{ billing_address.country }}
{{ billing_address.zip | upcase }}<br/>
{{ billing_address.phone }}<br/>
{{ email }}

{% if shipping_address %}
<p style="float: left; margin: 0 0 1em 00; padding: 1em;">
<strong>Ship To:</strong><br/>
{{ shipping_address.name }}<br/>
{% if shipping_address.company %}
{{ shipping_address.company }}<br/>
{% endif %}
{% if shipping_address.address2 %}
{{ shipping_address.address2 }} - {{ shipping_address.address1 }}<br/>
{% else %}
{{ shipping_address.address1 }}<br/>
{% endif %}
{{ shipping_address.city }},
{{ shipping_address.province_code }}<br/>
{{ shipping_address.country }}
{{ shipping_address.zip | upcase }}<br/>
{{ shipping_address.phone }}<br/>
</p>
{% endif %}

<hr />

<h3 style="margin: 0 0 1em 0;">Order Details</h3>

<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<thead>
<tr>
<th>Qty</th>
<th> </th>
<th>Item</th>
<th> <th>
{% if show_line_item_taxes %}
<th>Each </th>
{% endif %}
<th>Extended</th>
</tr>
</thead>
<tbody>
{% for line_item in line_items %}
<tr>
<td>{{ line_item.quantity }} </td>
<td><img src="{{ line_item.image | product_img_url: 'icon' }}" /></td>
<td>{{ line_item.title }}</td>

{% comment %}
<td>

{% unless line_item.variant.title contains 'Default' %}

{{ line_item.variant.title }}

{% endunless %}
</td>
{% endcomment %}
<td>
{% assign property_size = line_item.properties | size %}
{% if property_size > 0 %}
{% for p in line_item.properties %}
{% unless p.last == blank %}
<b>{{ p.first }}:</b>

{% if p.last contains '/uploads/' %}
<a href="{{ p.last }}">{{ p.last | split: '/' | last }}</a>
{% else %}
<b>{{ p.last }}</b>
{% endif %}

<br>
{% endunless %}
{% endfor %}
{% endif %}
<td/>
<td style="text-align: right;
margin-right: 1em;"> {{ line_item.price | money }}
</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 style="text-align: right;
margin-right: 1em;"> {{ line_item.line_price | money }}</td>
<!-- each price <td>{{ line_item.price | money }}</td> -->
</tr>
{% endfor %}
</tbody>
</table>

<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<tr>
<td>Subtotal:</td>
<td></td><td style="text-align: right;
margin-right: 1em;"> {{ subtotal_price | money }}</td>
</tr>
{% for discount in discounts %}
<tr>
<td>Includes Discount "{{ discount.code }}"</td>
<td></td><td style="text-align: right;
margin-right: 1em;">{{ discount.savings | money }}</td>
</tr>
{% endfor %}
{% if shipping_address %}
<tr>
<td>Ship by: {{ shipping_method.title }}</td>
<td></td><td style="text-align: right;
margin-right: 1em;"> {{ shipping_price | money }}</td>
</tr>
{% endif %}
<!-- <tr>
<td>Total tax:</td>-->
<!-- <td>{{ tax_price | money }}</td> -->

{% for tax_line in tax_lines %}
<tr>
<td>{{ tax_line.title }}:</td><td></td><td style="text-align: right;
margin-right: 1em;">{{ tax_line.price|money }}<br/></td>
</tr>
{% endfor %}
</tr>
<tr>
<td><strong>Total:</strong></td>
<td></td><td style="text-align: right;
margin-right: 1em;"><strong>{{ total_price | money }}</strong></td>
</tr>
{% if total_paid != total_price %}
<tr>
<td><strong>Total paid:</strong></td>
<td></td><td style="text-align: right;
margin-right: 1em;"><strong>{{ total_paid | money }}</strong></td>
</tr>
<tr>
<!--<td><strong>Outstanding Amount:</strong></td>
<td><strong>{{ total_price | minus: total_paid | money }}</strong></td>-->
</tr>
{% endif %}

</table>

{% if transactions.size > 1 %}
<h3 style="margin: 0 0 1em 0;">Transaction Details</h3>
<table class="table-tabular" style="margin: 0 0 1.5em 0;">
<thead>
<tr>
<th>Type</th>
<th>Amount</th>
<th>Kind</th>
<th>Status</th>
</tr>
</thead>
<tbody>
{% for transaction in transactions %}
<tr>
<td>{{ transaction.gateway | payment_method }}</td>
<td>{{ transaction.amount | money }}</td>
<td>{{ transaction.kind }}</td>
<td>{{ transaction.status }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}


{% if note %}
<h3 style="margin: 0 0 1em 0;">Notes</h3>
<p>{{ note }}</p>
<hr />
{% endif %}

<div></div>

<p align="center">Thank you, we appreciate your business!</p>

<!-- display Facebook and Instagram Logos -->
<p style="float: right; text-align: right; margin: 0;">
<img align="center" alt="facebook logo" src="https://cdn.shopify.com/s/files/1/1023/7667/files/facebook.jpg?11951029752365703537"
width="20" style="padding-bottom: 0;display: inline !important;vertical-align: bottom;border: 0;
height: auto;outline: none;text-decoration: none"> &nbsp; the sounding stone
</p>

<div style="float: left; margin: 0 0 1.5em 0;">
<img align="center" alt="instagram logo" src="https://cdn.shopify.com/s/files/1/1023/7667/files/Instagram_logo.jpg?11951029752365703537"
width="20" style="padding-bottom: 0;display: inline !important;vertical-align: bottom;border: 0;
height: auto;outline: none;text-decoration: none"> &nbsp; thesoundingstone
</div>

 

Any help/suggestions would be appreciated.

Thanks,

Grant. 

0 Likes