App reviews, troubleshooting, and recommendations
Hi, I am using the Dawn Theme and I would like to be able to add "SELLING FAST" or "LOW IN STOCK" to some of my products. Does anyone know how I can do this please - tried lots of different ways already!
Thank you!!!
Solved! Go to the solution
This is an accepted solution.
@ariathelabel If you want to choose where exactly its shown you will need to go into code editor. Click online store > Actions (to the right of page) > edit code. Then search for main-product.liquid.
Look for this code:
Then add the following code before (when) or after (endif).
{%- if product.selected_or_first_available_variant.inventory_quantity == 0 -%}
<p>COMMING SOON</p>
{%- elsif product.selected_or_first_available_variant.inventory_quantity < 25 -%}
<p>LOW IN STOCK</p>
{%- elsif product.selected_or_first_available_variant.inventory_quantity > 90 -%}
<p>SELLING FAST</p>
{%- endif -%}
@ariathelabel If on the product page, use below. Please note this will not update on variant chnage.
{%- if product.selected_or_first_available_variant.inventory_quantity > 90 -%}
<p>SELLING FAST</p>
{%- elsif product.selected_or_first_available_variant.inventory_quantity < 25 -%}
<p>LOW IN STOCK</p>
{%- endif -%}
To show or see the stock level, use:
{{ product.selected_or_first_available_variant.inventory_quantity }}
Thank you!!
But nothing is showing when I add that into a custom liquid box?
@ariathelabel I just tried on my dawn theme in a custom block and it works. Make sure your stock level for that product is either below 25 or above 90 or it won't show. Otherwise change the values in the code to match your desired needs.
Got it, thank you!!
I have one product that is currently out of stock completely - is there a way to add a third clause to say if the stock count is 0 then show "COMING SOON" ? Thank you so much for your help!
This is an accepted solution.
@ariathelabel If you want to choose where exactly its shown you will need to go into code editor. Click online store > Actions (to the right of page) > edit code. Then search for main-product.liquid.
Look for this code:
Then add the following code before (when) or after (endif).
{%- if product.selected_or_first_available_variant.inventory_quantity == 0 -%}
<p>COMMING SOON</p>
{%- elsif product.selected_or_first_available_variant.inventory_quantity < 25 -%}
<p>LOW IN STOCK</p>
{%- elsif product.selected_or_first_available_variant.inventory_quantity > 90 -%}
<p>SELLING FAST</p>
{%- endif -%}
Amazing, got it!! Thanks so much!!
Hi @shadowsfall118, how about if you also want to show the stock count on variant change?
@rm014 try following this - Versions 17.9.0 and above (near the bottom): https://help.shopify.com/en/manual/online-store/themes/themes-by-shopify/vintage-themes/customizing-...
@rm014 This guide also seems more detailed: https://parasoul.ltd.uk/shopify/dawn-theme-display-inventory-quantity
@shadowsfall118, tried to follow those but still not working, not sure why. Thanks though for helping.
@rm014 I followed this guide (https://parasoul.ltd.uk/shopify/dawn-theme-display-inventory-quantity) on a raw dawn theme and it does work. If you follow this guide do you get it to say "We have more than 10 in stock" if the stock is above 10?
If not you have some modifications that are not allowing the code to execute properly or you missed something in the guide.
If you do see "We have more than 10 in stock" and you would like it to say something different ex. total amount in stock or "Selling Fast" like the original request, let me know.
all good now @shadowsfall118, works like a charm. found the issue and it's working well now. Thank you so much for your help
Hey 👋,
Custom low stock message (with or without stock value) can be added to product page via HeyMerch low stock app. No code is requried. It works based on variant, can be selected to display for custom product or custom collection.
Make the shift from discounts to donations, and witness your business not only thrive fina...
By Holly Dec 4, 2023On our Shopify Expert Marketplace, you can find many trusted third party developers and fr...
By Arno Nov 27, 2023You've downloaded the Search & Discovery app from the Shopify App store, and as you're ...
By Skye Nov 8, 2023