Automatically check on a filter - Impulse Theme

2 0 0

I have filters set through Shopify's Search and Discovery but when a customer clicks through to one of my collections, I would like the Availability filter to be automatically checked and show only the available products.  It's fine to leave the checkmark there in case a customer would like to see sold out items and sign up for Back in Stock notifications, but I would like it to start as checked.  This should be easy, but I can't seem to find a good answer.


Thank you. 

Reply 1 (1)

Shopify Partner
6339 579 1348

If they are coming from a navigation menu you can control that by using the specific filtered url.

Here one of the impulse demos set to have small variants selected 


Beyond that javascript is required, or deeper advanced customizations

Sample javascript for product availability to use in a custom-liquid section on collection templates:

document.onreadystatechange = () => {
  if (document.readyState === "complete") {


Save time & money ,Ask Questions The Smart Way

Confused? Busy? Get the solution you need

Problem Solved? ✔Accept and Like solutions to help future merchants

Answers powered by coffee Buy Paul a Coffee for more answers or donate to