How do I display inventory for the products in the featured collection of my homepage?

Topic summary

The original poster using the Trade theme for a B2B store wants to display stock quantities alongside product photos, names, and prices in featured collections on their homepage.

Solution Provided:
A code snippet was shared to display inventory using Liquid template code that checks product.variants.first.inventory_quantity. However, the original poster initially resolved their homepage issue through the theme’s built-in inventory status settings.

Additional Requests:

  • Displaying actual quantity numbers (not just status) on standard product pages
  • Adding volume pricing display from the Sami Wholesale app on product pages
  • Fixing inventory status for NFT products created with NFTeapot

The helper required collaborator access to implement these customizations directly in the theme codebase.

Subsequent Users:
Two additional users (ankegem and NYC34213) joined the thread requesting similar inventory display functionality. Both received custom code implementations after granting collaborator access, with screenshots showing successful inventory quantity displays on collection pages and cart pages.

Status: The main inventory display issue was resolved for all three users through theme code modifications. The original poster’s secondary questions about volume pricing and NFT product inventory remain unaddressed in the thread.

Summarized with AI on October 28. AI used: claude-sonnet-4-5-20250929.

Hi,

I am using Trade theme for b2b store.

Trying to find a way to present stock qty along with product photo, name and price in various groups of products (like collection featuring on homepage)

How to do it?

Hi @TCC2

You can use this code snippet to show the inventory.

{% if product.variants.first.inventory_quantity > 0 %}
  

In stock: {{ product.variants.first.inventory_quantity }}

{% else %}
  

Out of stock

{% endif %}

Thanks!

Can I just ask for advice, how to implement this code snippet?

Sorry but, without seeing the codebase, I can’t suggest where you should add the code.

Could you provide me with the collaborator access?

sure, but how to do it?

OK, got it! it was in inventory status settings (LOL)

on the other hand, how to add quantities on standard product page, inventory status is fine, but hope we can show numbers as well here <?>

Thanks a lot
Thanks in advance

Please let me know store URL(ex. xxxxx.myshopify.com) so that I can send a collaborator access request.

https://3933b3-e8.myshopify.com

this is tricky, how add volume pricing on product page?
the app is called Sami Wholesale, they are not willing to help

The price is updating in cart according to volume limits, but not on product page (what I see as confusing to customer):

and why inventory status is not working on NFT products created with NFTeapot (but on the same product page template)

https://powerbay.store/products/nft-can-1mwh-saved-energy

You store requires a collaborator request code. Here is how to get it.

  1. Go to your Shopify store admin
  2. Select Settings
  3. Select Users and permissions
  4. Scroll down to the Collaborators section
  5. Copy the code and share with me.

priv message

This is the result for the first requirement:

So great!

Thank you !

Can you please help me with other issues I’ve pointed here ?

Hi there,

Can you also help me with the same issue?

Thx Anke

Hi @ankegem

Sure, what is your shopify store URL and what do you want?

Regards

Hi!

https://z4399g-ai.myshopify.com/

I would like to the customer to see the amount in stock under or next to each product, also in the cart if possible :slightly_smiling_face:

Thank you in advance.

Anke

Hi

It is necessary to update the theme codebase.

How do I do that?

Please send a private message to me.