Shopify themes, liquid, logos, and UX
Hi there!
At the moment I'm struggling with tweaking the New Order notification template to my needs.
For now I've referred to these resources:
https://help.shopify.com/en/manual/orders/notifications/email-variables
https://shopify.dev/api/admin/rest/reference/inventory/location#
Most important of all, I need to include which location each product has been sold from. (Since this store has multiple locations)
The info shows on the order page in Shopify on the product level so I know I must be a liquid variable of some kind.
I've tried both location.id & location.name - but nothing seems to even show up on the order template.
This is what the code looks like at the moment in that section of the template (I've only adjusted the last 6 lines of code)
<table class="row">
{% for line in subtotal_line_items %}
<tr class="order-list__item">
<td class="order-list__item__cell">
<table>
<td>
{% if line.image %}
<img src="{{ line | img_url: 'compact_cropped' }}" align="left" width="60" height="60" class="order-list__product-image"/>
{% endif %}
</td>
<td class="order-list__product-description-cell">
{% if line.quantity < line.quantity %}
{% capture line_display %} {{ line.quantity }} of {{ line.quantity }} {% endcapture %}
{% else %}
{% assign line_display = line.quantity %}
{% endif %}
<span class="order-list__item-title">
{% if line.product.title == blank %}
{{ line.title }}</span><br/>
{% else %}
{{ line.product.title }}
{% endif %}
{% if location.id == blank %}
{{ location.id }}</span><br/>
{% else %}
{{ location.id }}
{% endif %}
</span><br/>
The crucial information I need is the info of either warehouse 1 or 2, to be shown on the individual product.
Refer to this image below:
I really hope one of you in the community can help me out tweaking this code.
Otherwise I'm open to whatever can fix this issue. Maybe it's not the order notifications I should use - but something totally different.
Best regards,
Magnus
hey, did you ever find the answer to this?
Thanks,
Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025