How to show the bundle name on the packing slips?

On the order detail page, there is a text under a line item:
Part of: [BUNDLE NAME].

Can we show the same on the packing slip? I can’t get the original metafield after cart transformation. Or which line item field can support the bundle name?

Also I don’t have line item properties for the line items after the expand operation.

Hi Benny,

It doesn’t look like this is supported currently - I’m guessing the [Bundle Name] could change dynamically, so creating metafields separately might not solve for this?

You can use line_item.groups and get group.title in order to access Bundle name in packing slip.

{% for line_item in line_items_in_shipment %}
    {% for group in line_item.groups %}
        <span class="line-item-description-line">
            Part of: {{ group.title }}
        </span>
    {% endfor %}
{% endfor %}

Groups are only available for items that are part of Bundle.

Here’s how the packing slips looks:

1 Like

@prakhar

I don’t see a groups property under a line_item object?

No, I don’t have the metafields on the bundle components. I don’t see a useful property under line_item

Yes. It’s not mentioned in the liquid docs.

Let me know if you try this and it doesn’t work. Working pretty well for me :slight_smile:

I found it when I checked the packing slip template for Dawn. It supports showing bundle name by default in the packing slip.

3 Likes

Nice find Prakhar :wink:

Checking with our internal team to see why it’s undocumented.

1 Like

@prakhar Thank you for this. worked just as you said it would. I’ve added it to the top of my slip temporarily, You can see in the image below.

I have a slightly harder challenge with my bundle packing slip.

When someone orders a certain bundle (i.e. All Color Bundle, Bundle 1, Bundle 2…) i just want the slip to show one line item that says “All Color Bundle” or “Bundle 1” etc…

Or when they order from the bundle (i.e. Mix_&_Match) i need it to show the line items as usual.

I assume we can check that logic with an IF/ELSE where the IF true then display “this text” ELSE run the rest of the code i already have designed for my slip.

Can you please help me with that logic bit?
Thanks in advance!
~Regan

Thanks @prakhar. It works. But I wonder why it’s undocumented @Liam-Shopify . Is the property reliable for use?

Hi folks - this should be reliable to use, just currently undocumented.

1 Like