Thanks Admin-Gh. We can only hope the request is noticed by the Product Manager and is added to the Backlog and a Sprint soon.
Topic summary
Core Issue:
Shopify lacks a native option to sort products by stock status, preventing merchants from automatically pushing out-of-stock items to the bottom of collection, search, and tag pages.
Proposed Solution:
A developer shared custom Liquid code that modifies collection templates to separate in-stock and out-of-stock products, displaying available items first. The solution involves capturing products based on inventory quantity and rendering them in two separate loops.
Key Limitations:
- The custom code only works within individual pages when pagination is enabled—each page shows in-stock items first, then out-of-stock, rather than sorting across the entire collection
- Shopify’s Liquid
sortfilter doesn’t support inventory_quantity as a parameter - Requires manual template modifications across multiple sections
Feature Requests:
- Add stock-based sorting options to Liquid filters (STOCK_ASCENDING, STOCK_DESCENDING, PROMOTE_LOW_STOCK)
- Include inventory sorting in the admin Products panel
- Implement global and per-collection toggles for out-of-stock positioning with customizable sort orders (by title, price, date, quantity, etc.)
Community Response:
Multiple users confirmed needing this functionality and successfully implemented the code in various themes (Pipeline, Warehouse). One user noted the search results page already has this capability, highlighting the inconsistency. The pagination limitation remains unresolved.