Stop Empty Collection from going to 404

douglaskarr
Tourist
3 0 5

I have an empty collection that's seasonal.  Currently, it just goes to a 404. I'd like to actually have an if statement on the product.type and put a message but I don't know where this needs to happen.  Is that on the collection template? or on the 404 template? Is this the appropriate code?

 

{% if product.type == "Lamb" and collection.products_count < 1 %}

Our Lamb is seasonal from August through October, please subscribe and we\'ll let you know when we have it in stock. 

{% else %}
 
There are products on this page.

{% endif %}
0 Likes

Hi @douglaskarr 

 

Shoot me a message below and I'll fix this for you 

https://www.inspiresmallbusiness.com/pages/contact-clayton

 

Cheers 

Clayton Bates 

Grab Most Detailed FREE Review --->LEARN MORE


Client VIDEO TESTIMONIALS --->VIEW

0 Likes