Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Without app, how can I hide products which are unavailable in dawn theme the latest version? I’ve tried many other methods but they all aren’t applied to the latest version in dawn. Please help me.
Solved! Go to the solution
This is an accepted solution.
Hi @CHICXCHIC
if you just have few sold out products. here is a simple way for you to make it.
1: Online store > themes > Actions > Edit code > Sections > main-collection-product-grid.liquid
2: find ' {%- for product in collection.products -%} ' ( if you have not edited code before, it's at line 104)
3: paste code after '{%- for product in collection.products -%}' , just like image above.
{%- if product.available == false -%} {%- continue -%} {%- endif -%}
4: Save and refresh you colleciton page, it may need refresh more than one time or wait a few second
This is an accepted solution.
Hi @CHICXCHIC
if you just have few sold out products. here is a simple way for you to make it.
1: Online store > themes > Actions > Edit code > Sections > main-collection-product-grid.liquid
2: find ' {%- for product in collection.products -%} ' ( if you have not edited code before, it's at line 104)
3: paste code after '{%- for product in collection.products -%}' , just like image above.
{%- if product.available == false -%} {%- continue -%} {%- endif -%}
4: Save and refresh you colleciton page, it may need refresh more than one time or wait a few second
Thank you so so much! can you help me make out of stock products go to last page as well? Instead of hiding?
huh, I think it may impossible to make it simply via liquid ? (you can only get products of current page)
so you should manually edit it on collection.( or using some app to help you did those jobs 🙂
Okay then no problem thank you very much! I really appreciate your advice!
Why hide out of stock items when you can now sell them in transit! Please take a look at our new application "Stock In Motion" and start selling instead of hiding!!
Stock In Motion - Sell inbound inventory prior to arrival at fulfillment centers | Shopify App Store
Hi,
The main issue when hiding the out of stock products with liquid/CSS is that it's going to leave one or more blank spot(s) at the ending:
Ideally you must render all "out of stock" products and then show them.
I wrote a tutorial here showing how to achieve that.
It will work on all of the free Shopify themes as well, not only Dawn.
Let me know if you need any further assistance.
Kind regards,
Diego
Hello, @diego_ezfy
I tried to create the snippet from your tutorial and insert it in my site developed with Dawn, but it doesn't work, could you help me?
Here two collections with sold out products:
https://pgservice.cc/collections/remington
https://pgservice.cc/collections/all
Thank you in advance
@CHICXCHIC May this help you to hide products. Click Here.
Shopify and our financial partners regularly review and update verification requiremen...
By Jacqui Mar 14, 2025Unlock the potential of marketing on your business growth with Shopify Academy's late...
By Shopify Mar 12, 2025Learn how to increase conversion rates in every stage of the customer journey by enroll...
By Shopify Mar 5, 2025