Liquid, JavaScript, themes, sales channels
I need to push out of stock products to the end of catalog list
Please guide me how to solve this problem, or that file to dig. Our organization can't use an app and it takes several months to vet an app before we can install in admin.
I found this app which has the features that i am looking for: https://apps.shopify.com/push-down-hide-out-of-stock
Merchants that need a customization like this can contact me at paull.newton+shopifyforums@gmail.com with this topic url, store-url, theme name and any relevant use-case details.
Always backups themes and files before making changes!
For collections with more than 50 products you have to adjust the pagination per product skipped which gets a more advanced than the simpler instructions for <50.
For collections with less than 50 products! find the productloop in the relevant collection template and duplicate it so there are two loops one after the other.
i.e. {% for product in collection.products...
Careful do not put one loops codes in the other look for the correct closing {% endfor %} tags, follow the nesting methodically.
In the first loop, after the opening {% for %} tag , skip any products that are not available
{%- unless product.available -%} {%- continue -%} {%- endunless -%}
In the second product loop, after the opening {% for %} tag , skip any products that are available
{%- if product.available -%} {%- continue -%} {%- endif -%}
If you need regular things like this and approval takes awhile get an automation app like usemechanic
https://tasks.mechanic.dev/move-out-of-stock-products-to-the-end-of-a-collection
New Feature: Automatic free shipping discounts
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
Defeat problems ,Learn To Ask Questions The Smart Way
Thanks, how would i do it for this site? I couldn't find a collection.product file
https://www.woodscanada.com/
Which file has the correct product loop varies wildly by theme.
Look for code similar to what I posted already:
i.e. {% for product in collection.products...
New Feature: Automatic free shipping discounts
Confused? Busy? Get the solution you need paull.newton+shopifyforum@gmail.com
Problem Solved? ✔Accept and Like solutions to help future merchants
Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org
Defeat problems ,Learn To Ask Questions The Smart Way
User | RANK |
---|---|
21 | |
21 | |
9 | |
7 | |
6 |
Explore the 30-30-30 rule, a dynamic social media strategy for new businesses. Learn how t...
By Trevor Sep 20, 2023Discover how to leverage the often overlooked footer of your ecommerce site to gain custom...
By Skye Sep 15, 2023In this blog, we’ll be shining a light on Shopify Partners, Experts, and Affiliates. Who a...
By Imogen Sep 13, 2023