All things Shopify and commerce
Hi
For many of our products, if they go to zero stock, we can still get them, but it would be nice to let customers know there is a delay and we're ordering them in, rather than them thinking an items is in stock.
I used to have a little but of custom code which did this, I think I added it to the product.liquid page. Any idea what I can use.
Ideally I want it to say 'not in stock but we can order this in for you' and I'd only want it to work on the products which had the 'continue selling when out of stock' button ticked? Or simply showing that it's not in stock, but still orderable?
Can anyone help with this?
Hi @OrionLee ,
You have to just copy and paste this code in your product.liquid file or whatever product-template.liquid file
{% unless product.available %}
<p style="color: #000; background-color: darkseagreen; padding: 5px; border-radius: 5px; border: 1px solid #000; font-weight: 600;">Not in stock but we can order this in for you</p>
{% endunless %}
Your custom message will show when inventory is 0.
Please let me know if works and mark as solve!
Thanks I will give this a go, I think my them is in JSON though, rather than liquid. I assume that might make a difference? My previous theme was liquid.
@OrionLee There will be a liquid file in the section or snippet in sidebar of Shopify coding. there you can find and paste above code.
Does it have to go into product.liquid?
There's no product.liquid in either snippets or sections for some reason
@OrionLee Paste the code in the product-variant-options.liquid file it will show text above the variant options.
Hmm
Not sure if I have put it in the right place
Example of item it should be showing on https://shop.girlguidingnwe.org.uk/products/leaders-trefoil-woven-badge
Do you have Product info template or main product template if you found then please find for this class code product__tax caption rte if you found this class then just put above under this class name.
Like this?
That's great! You are too close. just paste the code above this line that's it!
{%- if shop.taxes_included or shop.shipping_policy.body != blank -%}
Now I hope it will definitely work!
I don't think it has worked 😞
@OrionLee You didn't place the code above the {%- if shop.taxes line just place above it. and check it will work.
Apologies!
Still not sure it's worked though
@OrionLee Perfect, now you can create any test product and add inventory 0 and check it will show your custom text.
Hmm
I already have a number of items like this - for example https://shop.girlguidingnwe.org.uk/products/guides-trefoil-woven-badge
But it's not showing,
I checked your example link but there is showing Add to Cart button that means this product have inventory. If product have zero inventory then button should show Sold Out instead of Add to Cart, that means you doing something wrong.
It has potential inventory - I can order it from our supplier. I don't want to prevent people from being able to buy the item. I just want them to know we don't have it physically in stock at the time it's purchased.
Hi @OrionLee ,
If you're still looking for help, I'd like to offer an alternative solution. Hey! Scarcity Low Stock Counter app includes a feature specifically designed for this purpose. It allows you to display custom messages on the product page for items that have the "Continue selling when out of stock" option enabled. You can easily set it up to show a message like "Not in stock but we can order this in for you" whenever a product goes out of stock but is still available for order.
This way, your customers will be aware of the delay and won't be misled into thinking the item is currently in stock. Here is the link to the app if you want to explore it.
If you're interested, I'd be happy to help you get this feature set up. Feel free to reach out for more details!
Best regards,
Tufan
Hey, @OrionLee
You have the option to input a personalized message that will appear when your product's stock reaches zero.
To set this up, head over to your Shopify admin dashboard and navigate to the "Products" section. Choose the specific product you want to modify and scroll down to the "Inventory" segment. Under "Inventory policy," opt for "Shopify tracks this product's inventory" and ensure that the "Continue selling when out of stock" box is checked.
In the "Out of stock message" field, you can craft your custom message. If you're looking for more advanced features, consider exploring Shopify apps like "Back in Stock" or "Stockify" for additional inventory management capabilities and tailored messaging options.
If there is anything else I can help you with, please let me know.
Dirk | Social Care @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit the Shopify Help Center or the Shopify Blog
2m ago Learn the essential skills to navigate the Shopify admin with confidence. T...
By Shopify Feb 12, 2025Learn how to expand your operations internationally with Shopify Academy’s learning path...
By Shopify Feb 4, 2025Hey Community, happy February! Looking back to January, we kicked off the year with 8....
By JasonH Feb 3, 2025