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
Save time & money ,Ask Questions The Smart Way
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
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...
Save time & money ,Ask Questions The Smart Way
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
Portrait of Stephen positioned next to an image of planet Earth, with the Stephen's World ...
By JasonH Mar 18, 2024Digital marketers and app developers have tracked activity in apps and websites for yea...
By Ollie Mar 13, 2024February was an exciting month with Shopify Editions, informative webinars, and more! F...
By JasonH Mar 7, 2024