How can I sort collections basis percentage of variants in stock?

Hi, I have a fashion brand. My concern is regarding sorting of collections. While we have hidden out of stock products from the collection page, we also want to sort the list basis percentage of variants in stock. This will help us show products with most available variants right on top and least available variants at the bottom. Can someone please help with this?

Hey Styleunion,

Heddy from Gameball here.

Unfortunately, Shopify doesn’t have a built-in feature to sort collections by the percentage of variants in stock. You might need to tweak your code a bit or use a custom app to achieve this. A developer could help you set up a sorting logic where the products with the highest percentage of in-stock variants appear first. It’s a bit of work, but totally doable!

We built the SortWise app to handle these exact kinds of advanced merchandising needs! It has sorting rules that can definitely look at your variant-level inventory to achieve that “most available variants first” goal you’re looking for. You should give it a look! It’s a perfect solution for advanced sorting like this.

Hello,

As your requirement, I recommend you use the third party app to do this. You can try the Kimonix app.