This guide will help you add the Giveaway Entries Badge to your Shopify theme's collection grid to display entry counts on product cards.

There are two ways to add the badge to your product cards, depending on your theme's capabilities:
Use this if your theme supports App Blocks in Product Cards (e.g., Dawn, Refresh, Sense, Craft, Studio, Horizon, and most themes released after 2022).
App Blocks allow you to add the badge through the theme editor without editing code:


Note: If you don't see the option to add blocks to Product Cards, your theme doesn't support App Blocks on product cards. Use Method B below instead.
Use this if your theme doesn't support App Blocks in Product Cards (e.g., Spotlight, Debut, Brooklyn, and most themes released before 2022).
To make your theme support App Blocks on product cards:
Common product grid files to look for:
sections/main-collection-product-grid.liquidsections/collection-template.liquidsections/featured-collection.liquidsnippets/product-card.liquidsnippets/card-product.liquidStep 1: Add App Blocks to Schema
Scroll to the bottom of your file to find the {% schema %} section. Add this inside the schema JSON:
"blocks": [
{
"type": "@app"
}
]

Important: Make sure to add commas where needed. The Shopify editor will highlight errors if the JSON is invalid.
Example schema structure:
{% schema %}
{
"name": "Product Grid",
"settings": [...],
"blocks": [
{
"type": "@app"
}
]
}
{% endschema %}
Step 2: Pass the section variable to the Product Card snippet
In your product grid section file, find where the product card snippet is rendered.
You need to add section: section to the render statement so the snippet can access app blocks.
Example: If your code looks like this:
{% render 'card-product', card_product: product %}
Update it to:
{% render 'card-product', card_product: product, section: section %}
Note: The snippet name may vary by theme (e.g., product-card, card-product, product-grid-item).

Step 3: Add Rendering Code
Open the Product Card snippet, find where you want the badge to appear (usually near the product price or title), and add this code:

{%- comment -%}Render app blocks with product context{%- endcomment -%}
{%- if section.blocks.size > 0 -%}
{%- for block in section.blocks -%}
{%- case block.type -%}
{%- when '@app' -%}
{%- if card_product and card_product.id -%}
<div class="app-block-product-wrapper"
data-product-id="{{ card_product.id }}"
data-product-handle="{{ card_product.handle }}"
data-variant-id="{{ card_product.selected_or_first_available_variant.id }}"
data-product-price="{{ card_product.selected_or_first_available_variant.price }}">
{%- render block -%}
</div>
{%- endif -%}
{%- endcase -%}
{%- endfor -%}
{%- endif -%}
Note: The product variable might be named differently in your theme (e.g., card_product, product_item). Check your theme file and adjust accordingly.
After saving, you'll be able to add the Entries Badge app block through the theme editor!

Badge not showing?
That's it! Your collection grid will now display giveaway entry counts on product cards.