I’m working on a shopify store that uses tags to manually put products in a ‘sold out’ state. Meaning, visually for the customer these are sold out, and you can’t add them to your cart, but in the system they’ve still got inventory etc. Now I’d like to adjust our filtering on the store to accommodate for this. Now, when you filter on availability ‘in stock’, items that are actually sold out (meaning inventory below or equal to zero), are hidden. But the items that are manually rendered as sold out (meaning they have the tag ‘sold out’), are still visible. How can I adjust in the code so that these are also hidden then?
I looked into options like adjusting the storefront filtering to add a filter by tag, but there’s no way to say “exclude the tag ‘sold out’”, only to include specific tags. And there are too many tags to add there, and they add on new ones almost daily.
Another thing I considered is filtering the results in the html returned after fetching, but that seems like a last resort, and I’d prefer to avoid fetching the unnecessary product data at a higher level.
I’m working on a custom version of the ‘Split’ theme.
Thanks in advance!