This resource is required
<h1>Hello and welcome to my online shop</h1> <ul> {% for item in collections.frontpage.list %} <li> {{ item.name }} </li> {% endfor %} </ul>
This template is used as the frontpage of your store. There are no default variables available in this template but using the collections and products dynamic objects you have access to everything in your store.
For example say we have a collection with the handle my_collection. To access the products you can use the following syntax:
<h1>All products in {{ collections.my_collection.name }}</h1> <p>There are {{ collections.my_collection.count }} in total</p> <ul> {% for item in collections.my_collection.list %} <li> {{ item.name }} </li> {% endfor %} </ul>
Pretty much the same way you have access to specific products by using their handle:
<h1>Promoted product {{ products.ID001.name }}</h1>
In the above example our promoted product had the handle = ID001.
Blog • Privacy Policy • Terms & Conditions • Copyright 2024 Ticket Rewards