Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hello,
When a new order is made, the administrators receives an email with the order details. It's ok.
I'd like to edit this notification template to display the information if the products are in inventory or if I would have to manufacture them (or some).
Reading the guide for Notification Variable Template (https://help.shopify.com/en/manual/orders/notifications/email-variables) it seems there's no variable available that could bring me that information. Is it right? Or am I missing something?
Would be there any workaround?
Thanks
Solved! Go to the solution
This is an accepted solution.
Ha, @jaircuevajr @amanda-91 I finally found a way to do this. Use this variable {{ line.variant.inventory_quantity }} to get the inventory stock, and then substract the {{line.quantity}}. So this should get what you need {{ line.variant.inventory_quantity - line.quantity }}
I wonder, if it is not possible, then would it be possible to have the inventory qty information on the orders page inside admin area? I mean, after clicking on a specific order.
The admin area allow this kind of customization?
We are looking the same, it will be great if the new order email can show the available quantity too. Do you have any luck in finding a solution?
Did you figure out a way to do this?
i have a similar desire of showing a line item value in order confirmation emails based on inventory state at a location. The only way I've come up with is to use Shopify flow and an inventory-change trigger to update the value of a variant metafield containing an integer of current stock value at a location. Was wondering if you came up with a way using less moving parts.
We are looking the same, I can now see there is a variable called `line.current_quantity` which I thought would show the inventory quantity, but it doesn't.
https://help.shopify.com/en/manual/orders/notifications/email-variables
Would anyone share the workaround or solution if you find it? Thanks so much.
This is an accepted solution.
Ha, @jaircuevajr @amanda-91 I finally found a way to do this. Use this variable {{ line.variant.inventory_quantity }} to get the inventory stock, and then substract the {{line.quantity}}. So this should get what you need {{ line.variant.inventory_quantity - line.quantity }}
Hi
Can you help me how the code should look?
Thanks. It helped me to see the Available and On-hand quantity in email itself.
Well done @oeshop !
Appreciate your effort.
I couldn't test it yet, but it looks right.
I never got the code to work as it should, i give the wrong stock-amount.
June brought summer energy to our community. Members jumped in with solutions, clicked ...
By JasonH Jun 5, 2025Learn how to build powerful custom workflows in Shopify Flow with expert guidance from ...
By Jacqui May 7, 2025Did You Know? May is named after Maia, the Roman goddess of growth and flourishing! ...
By JasonH May 2, 2025