Review the AI's code
Review this section and make the call.
The prompt given to the AI
Write me a Shopify section that shows the first four products from a collection as cards, each with the image, title, and price, linking to the product.
What the AI returned
<div class="featured">
<h2>Featured Products</h2>
<div class="grid">
{% for product in collection.products limit: 4 %}
<a href="/collections/all" class="card">
<img src="{{ product.featured_image | image_url: width: 300 }}">
<h3>{{ product.title }}</h3>
<p class="price">${{ product.price }}</p>
</a>
{% endfor %}
</div>
</div>
{% schema %}
{
"name": "Featured products",
"settings": [],
"presets": [{ "name": "Featured products" }]
}
{% endschema %}