Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{% for inventory_batch in order.metafields.freshly.inventory_batches %}
{% if line_item.sku != blank and line_item.sku == inventory_batch.sku %}
<p>
<strong class="item-description-line">
{{ inventory_batch.metadata.batch_name }}
</strong>
<span class="item-description-line">
Location: {{ inventory_batch.location }}
</span>
<span class="item-description-line">
Expiry date: {{ inventory_batch.expiry_date | date: "%b %d, %Y" }}
</span>
<span class="item-description-line">
Received date: {{ inventory_batch.received_date | date: "%b %d, %Y" }}
</span>
{% unless inventory_batch.metadata.batch_number == blank %}
<span class="item-description-line">
Batch number: {{ inventory_batch.metadata.batch_number }}
</span>
{% endunless %} {% unless inventory_batch.metadata.barcode == blank %}
<span class="item-description-line">
Barcode: {{ inventory_batch.metadata.barcode }}
</span>
{% endunless %}
{% unless inventory_batch.metadata.invoice_number == blank %}
<span class="item-description-line">
Invoice number: {{ inventory_batch.metadata.invoice_number }}
</span>
{% endunless %}
{% unless inventory_batch.metadata.description == blank %}
<span class="item-description-line">
Description: {{ inventory_batch.metadata.description }}
</span>
{% endunless %}
</p>
{% endif %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment