Add qty avalable to feature collection on homepage Dawn Theme

I’m trying to add the Inventory qty to the Featured product portion of the Homepage. I have tried a number of code I have found online and none seem to work. Anybody have solution? I got invetory to show on the collection page, Product page but this one is stumping me

Hello @MJGTrading ,

You can use this code

{% assign qty = card_product.selected_or_first_available_variant.inventory_quantity %}

{% if qty > 0 %}
  

{{ qty }} available

{% else %}
  

Out of stock

{% endif %}

Regards
Guleria

Thanks for the code. I would like it to show up right below the price, For some reason today Im having a hard time figuring this out

Our store is gated, but I can send you the code if that helps?

just sent private message to you

Go to
Snippets → card-product.liquid

search for

{% render ‘price’, product: card_product, price_class: ‘’, show_compare_at_price: true %}

once found next to it add the code.

Regards

Guleria