Product description in packing slip

Eee1
Tourist
5 0 25

I am editing the packing slip, but all the variables in it are "line item" and not by product. For example:

 

{% if line_item.variant_title != blank %}
<span class="line-item-description-line">
{{ line_item.variant_title }}
</span>
{% endif %}

 

This means I cannot use the liquid variable product.description since it is not part of the line item object. Any help?

 

Or any add-on where I can put description to print out orders?

Replies 8 (8)
Eee1
Tourist
5 0 25

Or, how can I make the for loop to accommodate the product object?

NCCharcuterie
Tourist
3 0 1

Did you ever find a solution to this? I'm trying to so the same thing. I'd like to add the complete product description to the packing slip.

roma2
Tourist
4 0 1

I am running into the same problem. how did you resolve this?

 

NCCharcuterie
Tourist
3 0 1
I have not found a solution yet. I just print the description separately.
roma2
Tourist
4 0 1

I tried inserting this code in the liquid packing slip template and we have the description showing up now.  it's the red text inserted between the existing sections. if it doesnt work i might not have copied or highlighted enough of the code; lmk and i'll copy more of it for you.  it's not elegant but it did work for us.

 

            {% if line_item.variant_title != blank %}
              <span class="line-item-description-line">
                {{ line_item.variant_title }}
              </span>
            {% endif %}
            {% if line_item.sku != blank %}
              <span class="line-item-description-line">
                {{ line_item.sku }}
              </span>
            {% endif %}
            <span class="line-item-description-line">
              {% assign product_description = nil %}
              {% for item in order.line_items %}
                {% if item.sku == line_item.sku %}
                  {% assign product_description = item.product.description %}
                {% endif %}
              {% endfor %}
              {% if product_description %}
                {{ product_description }}
              {% endif %}
            </span>
          </p>
        </div>
        <div class="flex-line-item-quantity">
          <p class="text-align-right">
            {{ line_item.shipping_quantity }} of {{ line_item.quantity }}

NCCharcuterie
Tourist
3 0 1

Thank you for this code! I just copied and pasted it to our packing slip code and it is almost what we need. For some reason the description is the same for each product, it's not the unique product description.  So if someone orders three different products, the same descriptions appears, but they should be different. Any idea how to fix this? I added a copy of the packing slip so you can see what I'm talking about. I removed the shipping and billing info for privacy. Those normally show up just fine.

MaulikP26
New Member
1 0 2

Please put 
{% assign product_description = nil %}
Inside forloop

lvonguionneau
New Member
1 0 0

Still finding a problem with this. Can you clarify what the code should look like? This would help us a great deal! Thanks everyone