Hide Out Of Stock Products From Default Vendors Collections by shopify

How do I hide or remove the out of stock product when I click on vendor on collection page?

Hi @ChetanC_1

The vendor collection page is built using the collection template, you would need to find the file that controls the listing of the products on the collection page and add a general conditional statement inside the for loop that fetches product where the restriction would be:

{% if product.availabe %}
All the code to display the product
{%endif%}

Should that help answer your query, we always appreciate liking & marking an as answer to let the community find quality solutions faster. Thanks!

Hi @ChetanC_1

would you mind checking our app Nada: Sort & Hide Out Of Stock?

The app is automatically hiding sold-out products and sets a redirect to the homepage or any other page. Once the product is back in stock, it’s published again and the redirect is removed. Like this, you are not being penalized on SEO as the visitors never get to the 404 page.

Try it for free for 7 days and check if it helps to solve your problem.