I know this is a really old thread, but I was looking for the same thing for a long time, and finally found a free app! It is called Collection Merchandiser. Hope this helps (if you haven’t found something in the meantime).
Topic summary
A Shopify store owner using the free Simple theme seeks a code solution to automatically push out-of-stock items to the bottom of collection pages, keeping them visible but separated from available products. This is particularly important for a vintage store with many unique items where deleting sold listings isn’t desirable, and paid apps seem cost-prohibitive.
Initial Attempts:
- One responder provided Liquid code for displaying inventory status, but this only shows stock information rather than reordering products
- The code was tested above the “add to cart” button but didn’t achieve the desired sorting effect
- The responder clarified this approach isn’t possible with simple code modifications
Recommended Solutions:
- Nada app: Automatically sorts collections in real-time, pushing sold-out products to the end and returning them when restocked (free trial available)
- Collection Merchandiser app: A later commenter found this free app after searching for the same functionality
Status: The thread remains unresolved for a pure code-based solution. Automated sorting of out-of-stock items to collection bottoms appears to require third-party apps rather than custom Liquid code in the Simple theme.