Display stock availability in debut

Solved
Highlighted
Tourist
3 0 1

Hello,
I would like to be able to display something like an "in stock" label for customers to see when they view a product that is in stock, and if possible, on the catalogue/collection pages as well. I am using the debut theme.

Currently, the theme only displays a "sold out" label for products which are out of stock on the individual product pages as well as on the various catalogue/collection pages. I would simply like to add this exact type of label for the reverse condition in order to make it clear which products are available and which products are not.

How would I go about doing this?
Thank you.

0 Likes
Highlighted
Hello snostorm1792,
If there is no default functionality to display in stock we have customize theme to display that.
You have to customize product-template.liquid file.
Mail me if any help needed: pallavi@oscprofessionals.com
Want to modify or incorporate custom changes on store, Hire us
If helpful then please Like and Accept Solution .
Email: pallavi@oscprofessionals.com
Skype : oscprofessionals-87
Whats app
Free Website Review and advice for sale from Shopify Conversion Experts | Shopify Private App | Custom Theme Development | Custom Modifications In To Shopify Theme | Shopify SEO ; Digital Marketing & amp | Site Speed Optimization | Performance Site Audit
0 Likes
Highlighted
Shopify Partner
1119 240 340

This is an accepted solution.

Hi

 

In order to enable the inventory tracking option, navigate to your HTML/CSS editor and select the product-template.liquid. Scroll to line 111 and paste the following code:

<div id="variant-inventory">
 {% if product.variants.first.inventory_management == "shopify" %}
    {% if product.variants.first.inventory_quantity > 0 %}
       We currently have {{ product.variants.first.inventory_quantity }} in stock.
    {% else %}
       The product is out of stock
    {% endif %}
 {% else %}
    This product is available
 {% endif %}
</div>

If your product does not have inventory tracking enabled, it will simply read as, "This product is available." 

 

Hope this will work for you.

 

Thanks!

If helpful then please Like and Accept Solution.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
1 Like
Highlighted
Tourist
3 0 1

Thank you so much for the reply! I pasted the code as instructed on line 111 in the product-template.liquid file, but it doesn't seem to make a difference when I save the code and refresh my shopify store, neither within the individual products nor on the catalogue page. Did I paste the code correctly? I apologize in advance for this rudimentary and possibly stupid question, I have very little experience in programming. Please see images below.

 

Screenshot 2020-06-02 at 12.39.44.pngScreenshot 2020-06-02 at 12.40.31.png

0 Likes
Highlighted
Shopify Partner
1119 240 340

This is an accepted solution.

Hi

paste code line No 131 and check your product page.

 

Thanks!

If helpful then please Like and Accept Solution.
Do you need custom changes on store ? Hire me.
Feel free to Contact me on dmw.webartisan@gmail.com
Follow us on Instagram @dmw.webartisan
1 Like
Highlighted
Tourist
3 0 1

Thank you so much. That solved it. I gave you a couple of likes and designated your replies as solutions to my question as thanks for your helpfulness.

1 Like