Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi maybe some one can help im trying to show product tags on a packing slip here is hat I have but nothing shows
{% for line_item in line_items_in_shipment %}
<div class="flex-line-item">
<div class="flex-line-item-img">
{% if line_item.image != blank %}
<div class="aspect-ratio aspect-ratio-square" style="width: {{ desired_image_size }}px; height: {{ desired_image_size }}px;">
{{ line_item.image | img_url: effective_image_dimensions | img_tag: '', 'aspect-ratio__content' }}
</div>
{% endif %}
</div>
<div class="flex-line-item-description">
<p>
<span class="line-item-description-line">
{{ line_item.title }}
</span>
{% 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 %}
</p>
</div>
<div class="flex-line-item-quantity">
<p class="text-align-right">
{{ line_item.shipping_quantity }} of {{ line_item.quantity }}
</p>
</div>
<div class="flex-line-item-tags">
<p class="text-align-right">
{% for tag in line_item.product.tags %}
{{ tag }}
{% endfor %}
</p>
</div>
</div>
{% endfor %}
any ideas?
I have not tested your code but the following part of your code should do that:
<p class="text-align-right">
{% for tag in line_item.product.tags %}
{{ tag }}
{% endfor %}
</p>
are you sore you are testing with a product which has tags?
Hi yes It definitely has tags just doesn't show which is odd and I cant check the raw HTML as it converts it to a pdf
ok, so I checking the docs and I don't think the line_item.product is an available property inside packaging slips:
Confirmed that the only properties available for the line item inside the packaging slip are:
line_item.image line_item.title line_item.variant_title line_item.sku line_item.vendor line_item.quantity line_item.shipping_quantity line_item.properties
Other properties like line_item.product, line_item.product_id, line_item.final_price... or any other property from https://shopify.dev/docs/themes/liquid/reference/objects/line_item, is not available
Hi
Thanks for trying I guess the hunt continues
Hi there! I tried this and it worked fine for me:
{% for item in order.line_items %}
{% for tag in item.product.tags %}
{{ tag }}
{% endfor %}
{% endfor %}
I'm sorry if its too late haha
We recently spoke with Zopi developers @Zopi about how dropshipping businesses can enha...
By JasonH Oct 23, 2024A big shout out to all of the merchants who participated in our AMA with 2H Media: Holi...
By Jacqui Oct 21, 2024We want to take a moment to celebrate the incredible ways you all engage with the Shopi...
By JasonH Oct 15, 2024