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

Add an out of stock / in stock message on product page

Add an out of stock / in stock message on product page

isaacdob
Excursionist
65 0 1

I am wanting to add an out of stock and in stock message on my product page. I am using theme Dawn and have attached some example photos for reference. Thanks for the help 🙂

 

Website - www.evrenclothing.com 

Password - Chewno

 

Screenshot 2024-06-17 at 9.36.06 PM.png

Screenshot 2024-06-17 at 9.36.12 PM.png

  

Replies 3 (3)

Team_OSC
Shopify Partner
158 18 25

Hi @isaacdob 

Do you want something like this?

Screenshot .png

LuffyOnePiece
Shopify Partner
650 93 121

Hi @isaacdob ,

 

You can simply add the code below in the product page.

{% if product.available == false %}Out of stock {% else %} In Stock{% endif %}

 

Let me know if you need any assistance.

 

Thank you

Sandeep Pangeni
Need help with your store? sandeeppangeni17@gmail.com
For quick response, Contact In WhatsApp +9779867521184

Kyle_liu
Shopify Partner
441 55 80

Hi @isaacdob 

 

1、Edit main-product.liquid 

2、Find '{% - when' popup '-%}' and add the following code above

<div style="text-transform: uppercase;">
    {% if product.available == false %}
         <div style="font-weight: bold">OUT OF STOCK</div>
         <div>THIS SIZE IS OUT OF STOCK</div>
    {% else %}
         IN STOCK √
    {%- endif %}
</div>
If this is helpful, please Like and Accept the solution.
Want to modify or custom changes on store? Let me help.
- Feel free to contact me Email Me Buy Me A Coffee