How to add a message when there are no products in a collection

Hello everyone,

I am trying to add a message that appears on a page when the features collection has no products in it. (I am using the Dawn theme).

I appreciate all the help.

Many thanks in advance.

Hi @woodpaz_books

Please add this code after 345 line number in card-product.liquid


    

    ##  NO products yet.
    
    

  

If this solution is worked, then please Like this and Mark this as accepted solution!

Laddi

1 Like

Hi Ladii,

Thank you for the help. This worked.

The code makes the message appear 4 times in one row. Can you advise me on how to edit the code so the message appears once?

1 Like

@woodpaz_books

Can you please share store URL?

It’s https://b41736-3.myshopify.com/pages/view-all

(I only just started building the website).

@woodpaz_books

Can you please share your template file code?

call the snippet in template right?

Can you clarify which code you want? The code for the file card-product.liquid?