Why are products not visible in Shopify collections preview?

Maddison
Shopify Partner
67 1 5

I am visually changing a clients store (I didn't build) I can see products in each collection in the back end but when I view them on the preview it says: 

"Sorry, there are no products matching your search"

 

<div id="link-to-tag-generic" style="display: none; visibility: hidden;">
						  {{ 'tag' | link_to_tag: 'tag' }}"
						</div>
						{% if collection.handle %}
						  <input type="hidden" id="link-to-collection" value="/collections/{{ collection.handle }}" />
						{% elsif collection.products.first.type == collection.title %}
						  <input type="hidden" id="link-to-collection" value="{{ collection.title | url_for_type }}" />
						{% elsif collection.products.first.vendor == collection.title %}
						  <input type="hidden" id="link-to-collection" value="{{ collection.title | url_for_vendor }}" />
						{% endif %}
					</div>
				{% endif %}

 

Replies 2 (2)

Tira
Shopify Staff (Retired)
1260 90 223

Hey, @Maddison

Tira here to help. 

That’s awesome you’re helping a client with changing the look of their store. We aren’t trained in coding, so I wouldn't be able to help with the code that you've provided here directly, but it sounds like the error you’re receiving here is related to the products not being published on the storefront.

If that is what is happening, can I please get you to try the steps listed in our help doc here: Change the availability of a collection? This will help you change the availability of a collection.

When you change the availability of the collection, you’ll be able to make sure it’s available on the sales channels that you use, and you can also specify a future date for when you want to publish the collection.

I would love to know if this helps you accomplish your goal!

To learn more visit the Shopify Help Center or the Community Blog.

Tira
Shopify Staff (Retired)
1260 90 223

Hey, @Maddison.

Tira here again. How have you been? 

I provided some steps earlier on changing the availability and publish date of a collection. Did these steps help you with what you needed to do? Or have you found a solution?

I would love to know!

Talk soon,

To learn more visit the Shopify Help Center or the Community Blog.