Shopify themes, liquid, logos, and UX
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
Hello!
I'm using the feature on Dawn theme to display inventory. I only want the inventory count to show if the item stock is equal or less than a quantity of 10.
How would I go about doing this in the code? Can someone please assist with this?
Thank you!
Solved! Go to the solution
This is an accepted solution.
@magikartcards you can edit product liquid file,
for product variant check inventory_quantity and
if this inventory_quantity is less than 10 then display the number.
This is an accepted solution.
@magikartcards you can edit product liquid file,
for product variant check inventory_quantity and
if this inventory_quantity is less than 10 then display the number.
How would I do this? I don't know the right area to edit the code.
@magikartcards if you can accept me as collaborator then I can check it and let you know
Here is the request code 4664
@magikartcards - what is your website link?
@magikartcards - can you please share a product whose inventory is less than 10?
@magikartcards - please check DM
Hello @magikartcards
Steps to Display Inventory Count Only When Stock is 10 or Less
{% if current_variant.inventory_quantity <= 10 and current_variant.inventory_quantity > 0 %}
<p class="inventory-count">
Hurry! Only {{ current_variant.inventory_quantity }} left in stock.
</p>
{% endif %}
Hi, thank you for the response. I am having trouble finding the right area to change this code.
My website is:
Would you be able to assist with finding the right spot to paste the code? There is no password. I appreciate your help!