Shopify CLI Undefined Object error

Hi,

In Liquid code, when I do shopify deploy, I get this error

[warning]: UndefinedObject
Unknown object ‘products’ used.
248 {% for product in products %}

But the code works absolutely fine. Please help. What might be wrong here?

Where exactly are you using this? Having checked the documentation I don’t believe products exists. You can do something like collection.products etc

Hi Luke,

I am trying to access the products on the current collection page via app embed liquid file.

Its interesting that it doesnt exist but it works :slight_smile:

Thanks so much, yes collection.products gives me the same results.