Debutify theme: Adding product availability / stock to product variants on product page

Topic summary

A user seeks help adding product availability/stock information for variants on a product page using the Debutify theme. Previous methods from Shopify Community forums proved clunky and didn’t display well on mobile.

Solution provided:

  • Another user shares Liquid code that checks inventory management and displays stock quantities
  • The code uses conditional logic to show different messages based on availability

Implementation details:

  • Code should be added to templates/product.liquid file
  • Confirmed working on Debutify theme’s product-template.liquid page
  • At least one user successfully adapted the code for their specific needs

The discussion appears resolved with a working code solution that addresses the mobile display concerns.

Summarized with AI on November 21. AI used: claude-sonnet-4-5-20250929.

Hi,

I’m wondering if anyone has any experience with this? I’ve tried a few different methods that I found on the Shopify Community, but they feel kind of clunky and definitely don’t look good in a mobile view.

My page is https://ruch.store/products/leggings

@sampesce

Thanks for post

can you please try this code


{% 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 %}

Hi, thanks for your reply Ketan! In which files, and where in the file would I put that code?

@sampesce

please add this code on this file

Hi @KetanKumar ,

worked for me, I could use your code as a template for my needs.

Worked for Debutify theme adding it on product-template.liquid page.

Thanks!