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?
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
User | Count |
---|---|
25 | |
20 | |
19 | |
16 | |
15 |