how to set collections "in stock" tag?

how to set collections "in stock" tag?

gennadyh
Tourist
4 0 1

Hi all,

I have a brand of clothes,
I would like to sort only the sizes that are in stock under the collection page,

there is no point in the customer looking for a size and type and then finding out that it is not in stock at all.

 

I found few options across the discussions here, but not so helpful.

I am interested in finding an application or code that will allow adding a button in a permanent state - in stock.
I would love to help!

gennadyh_0-1725816831161.png

 

Replies 4 (4)

heddykhalifa
Shopify Partner
142 12 34

Hi Gennadyh, 

 

Heddy from Gameball here.

The simplest way to handle this is through custom coding. You can add a conditional statement in the collection template that checks if the product has available inventory and displays the "In Stock" tag if so. This will require editing the liquid file for your collection page.

You'll need to go into your Shopify theme editor, navigate to the collection template, and implement a check for each product in the loop. If the inventory is greater than zero, you can add your custom "In Stock" tag.

If coding isn't your thing, you might consider using a third-party app designed to handle product badges. Some apps can help automate this process without needing to dig into the code.

JoesIdeas
Shopify Partner
2411 223 644

Good idea.

 

If you don't want to rely on custom coding you use the Stock Sort feature on the Product Automator app to handle sorting by stock for certain collections.

 

The app is also customizable so if the stock features don't do exactly what you want, you can make a request to customize for your situation.

 

If you're wanting to automatically do some stock sorting for collections, the app will be a good solution.

 

On the other hand if you're wanting the customer to be able to control that setting, you'll likely need a custom coded solution that is tailor made for your website exactly.

• Creator of Order Automator [auto tag, fulfill, connect FBA, order jobs]
• Co-Creator of Product Automator [suite of features for products / collections]
• Shopify developer for 10+ years, store owner for 7 years
• Blog: Shopify Tips, Guides, and Automation Tools
gennadyh
Tourist
4 0 1

Thank you very much!

At the moment my solution is to copy the link of the collection when the filter is set to products in stock only - and update the navigation to the  this link.
Do you have a recommendation for a free application that knows how to give the option of setting a default filter?

JoesIdeas
Shopify Partner
2411 223 644

That sounds like a reasonable workaround.

 

For someone building a solution for free, I don't know of any.

• Creator of Order Automator [auto tag, fulfill, connect FBA, order jobs]
• Co-Creator of Product Automator [suite of features for products / collections]
• Shopify developer for 10+ years, store owner for 7 years
• Blog: Shopify Tips, Guides, and Automation Tools