Retail hardware, software, and Shopify Point of Sale
Can someone share how I might add a variant metafield to a printed receipt as a line item?
If the namespace and key is 'custom.location', what would be the code I'd use?
Hello @NDJAU ,
Try this
{% for line_item in transaction.line_items %}
{{ line_item.product.title }} - {{ line_item.variant.title }}
Quantity: {{ line_item.quantity }}
Price: {{ line_item.price | money }}
{% assign metafield_value = line_item.variant.metafields.custom.location %}
{% if metafield_value %}
Additional Info: {{ metafield_value.value }}
{% endif %}
{% endfor %}
If problem solved don't forget to Like it and Mark it as Solution!
And if you need help with customization/code part you can contact me for services
You can find the email in the signature below.
Thanks
Thanks - would this go in the code editor under the line-items.liquid section?
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024