I’m very new to shopify theme development and I’m currently working through a course. I’m trying to display all products in the collection however, it only displays a single product as shown here.
The product list is shown here.
<section class="container">
{% for product in collections[section.settings.featured_collection].products %}
<div class="card">
<h3>{{ product.title }}</h3>
<p>{{ product.price }}</p>
</div>
{% endfor %}
</section>
{% schema %}
{
"name": "Featured Collection",
"class": "featured-collection-section",
"settings": [
{
"type": "collection",
"id": "featured_collection",
"label": "Collection"
},
{
"type": "text",
"id": "title",
"default": "Featured Collection",
"label": "Title"
}
],
"presets": [
{
"category": "Collection",
"name":"Featured Collection"
}
]
}
{% endschema %}