Total Weight Displaying on Order Printer App

Dispalying the total order weight on the Order Printer app.

I’ve seen a few posts about this and even questions on other forums about it with no solution.

Today, after an hour or so of fiddling, I managed to find a solution and thought I would share it.


  1. First we assign 2 new variables temp_weight and total_weight (outside of the for loop)
{% assign temp_weight = 0.00 %}
    {% assign total_weight = 0.000 %}
    {% for line in line_items %}
  1. Next we assign the line_item.weight to the temp_weight (inside the for loop)
{% assign temp_weight = line_item.weight %}
  1. Also in the for loop just after step 2 we need to assign the total_weight to be equal to itself + temp_weight
{% assign total_weight = total_weight | plus: temp_weight %}
  1. Then we can just call {{ total_weight }} and display our total order weight on screen (note: you cant call this before the for loop or it will return an empty value)
{{ total_weight | plus: 30 }}

(I add 30 to my total weight to account for wrapping/packaging but you can remove that)


I was scouring the internet to find an answer and couldn’t find one anywhere but a lot of people seemed to want to do this. I hope this helps at least one person :slightly_smiling_face: