Code to edit packing slips (show updated order details)

Code to edit packing slips (show updated order details)

Minako85
Excursionist
38 0 11

Hi, I need help on editing packing slips!

 

I've managed to add the product price, shipping rate and order total quantity, amount etc to my packing slip. 

However, whenever an order is edited (ie. removing products), the amounts on the packing slip does not change.

 

Does anyone know the code to deduct cancelled items from the packing slips?

 

This is the code I'm currently using.

 

 

 

<p class="text-align-right">
{% assign final_price = nil %}
{% assign line_name = line_item.title %} {% if line_item.variant_title != blank %} {% assign line_name = line_name | append: " - " | append: line_item.variant_title %} {% endif %} {% for item in order.line_items %} {% assign order_name = item.title %}
{% if order_name == line_name %}
{% assign final_price = item.final_price %}
{% endif %}
{% endfor %}
{% if final_price %}
{{ final_price | money }}
{% endif %}
/
{{ line_item.quantity }}
</p>
</div>
</div>
{% endfor %}
</div>
{% unless includes_all_line_items_in_order %}
<hr class="subdued-separator">
<p class="missing-line-items-text ">

</p>
{% endunless %}
<br><br><br>
<div class="flex-totals">
<p class="text-align-right">
Subtotal:{{ order.subtotal_price | money }}
<br>
Shipping {{ order.shipping_price | money }}
<br>
<strong>
Order Total {{ order.total_price | money }} </strong>
<br><br>
Taxable Amount {{ order.total_price | minus: refund_amount | money }}
<br>
Tax Amount {{ order.total_price | divided_by: 1.1 | times: 0.1 | money }}
<br>
Payment Method  Credit Card
</p>
</div>

 

 

 

Replies 0 (0)