Product description in packing slip

Eee1
Tourist
5 0 28

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 11 (11)

Eee1
Tourist
5 0 28

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

NCCharcuterie
Tourist
3 0 2

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 3

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

 

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

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 2

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
Visitor
1 0 2

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

lvonguionneau
Visitor
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

suzro
Visitor
1 0 0

Thank you so much Roma2 - this worked for me and now I can include detailed product description from web site without having to retype it!

 

mark4986
Visitor
3 0 0

If you have a more complete version of this code that you could share, that would be great. I can't get this snippet to do anything.

tdewith
Visitor
1 0 0

Hi there, just added this code and the description shows up on the packing slip.

But when I have two or more products in an order, the description is the same for each product.
Do you know how I can fix that?