这段代码会遍历名为"recommendations"的产品集合,并显示相关产品的图片、标题和价格
{% for product in collections.recommendations.products %}
<div class="recommended-product">
<a href="{{ product.url }}">
<img src="{{ product.featured_image | img_url: 'medium' }}" alt="{{ product.title }}">
<h3>{{ product.title }}</h3>
<p>{{ product.price | money }}</p>
</a>
</div>
{% endfor %}