OFFLINE-GmbH / oc-snipcartshop-plugin

Ecommerce solution for October CMS using snipcart.com as a backend
MIT License
11 stars 4 forks source link

List all products in a partial #14

Closed Zmove closed 7 years ago

Zmove commented 7 years ago

Hello,

I'm trying to customize the markup of my product list. To do that, I use the october CMS way, I call a partial /shop/list.htm and I add the component in my partial and try to loop throught the {{ products }} variable.

But it doesn't work. If I print {{ products }} I don't get the products object, it just display a "products" string.

It works if I put the component in a page.

Is there any limitation that could explain that I can work in a partial ? Cause I did this for the blog for example, and it perfectly works...

Thanks for your help

Alex

tobias-kuendig commented 7 years ago

Try {{ products.products }}. You have to call the products property on the products component.

Zmove commented 7 years ago

Thank you, it worked.