Adding each item's price & weight on Packing Slip

Topic summary

Goal: show each line item’s price and weight on a Shopify packing slip (Liquid template) without duplications.

Latest progress: The requester successfully outputs the item’s price by matching the current line_item’s title (plus variant_title) to the order.line_items and rendering item.final_price | money. Weight display remains unresolved.

Suggested approach: Retrieve weight from the variant: item.variant.weight (per Shopify’s line_item/variant docs). Code examples are central to this thread. Note: One proposed snippet used non-Liquid syntax (set prev_sku) and an != comparison that would print other items, which likely caused issues.

Open issues: Multiple users ask where exactly to place the code in the packing slip template (likely inside the loop iterating order.line_items/line_item). Another user reports weight always shows “0.0 oz” and quantity misalignment (screenshot provided), suggesting the variant weight may be unset or unit/formatting is incorrect.

Status: Price output solved; weight and template placement unresolved. Next steps: confirm variants have weight values, use item.variant.weight (and appropriate unit formatting), and ensure code runs within the correct line item loop in the packing slip template.

Summarized with AI on January 4. AI used: gpt-5.

Hello,

I was able to add item price on the packing slip with the code below, but it shows ALL prices under each item (repetitive).

Can you please help on adding prices & weight on the packing slip?

{% for item in order.line_items %}
{% if item.sku == line_item.sku %}

{{ item.final_price | money }}

{% endif %}
{% endfor %}

Hi @Amir212

You can try one of them:

{% for item in order.line_items %}
    {% if item.sku != line_item.sku %}
        <span class="line-item-description-line">
            {{ item.final_price | money }}
            {{ item.weight | weight }}
        </span>
    {% endif %}
{% endfor %}

or

{% for item in order.line_items %}
{% if item.sku != prev_sku %}
<tr>
<td>{{ item.final_price | money }}</td>
<td>{{ item.weight }}</td>
</tr>
{% set prev_sku = item.sku %}
{% endif %}
{% endfor %}

I hope it helps @Amir212 !

Hello,

Thank you for the input, but both didn’t work.

I was able to add item price with this code (just in case anyone else needs to):

{% 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 %}

If anyone can help with adding the weight that would be great!

Hey @Amir212 ,

When I follow this Shopify documentation: https://shopify.dev/docs/api/liquid/objects/line_item
I realize that you can retrieve the weight by using the variant’s weight property.

Here’s the code snippet:

{% assign final_price = item.final_price %}
{% assign weight = item.variant.weight %}
{{ weight }}

I hope this helps! If it works for you, please mark it as a solution. I am very happy for that. Have a great day!

Can you please tell me the exact place in the template where we should put this code?

I’d like to know this too, please. I am having a hard time showing the weight. It just says 0.0 oz all the time and also that quantity does not line up. Please help.

screenshot of problem