Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
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>
Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024The Hydrogen Visual Editor is now available to merchants in Shopify Editions | Summer '...
By JasonH Sep 2, 2024Note: Customizing your CSS requires some familiarity with CSS and HTML. Before you cust...
By JasonH Aug 12, 2024