Dawn Theme - custom tag for certain products on Collection all pages - metaobjects?

Topic summary

Goal: show a small “Customize” text only on selected products within all Collection pages in the Shopify Dawn theme (v12), text-only, not a link.

Proposed solutions:

  • Liquid handle check (in Sections/card-product.liquid inside the card__information element): print “Customize” when card_product.handle matches specific products. “Handle” = the product’s URL-friendly identifier.
  • CSS pseudo-element: add a class to targeted cards and use ::before with content: ‘Customize’; requires adding a class only on desired products.
  • Metafield-based: create a product metafield (e.g., custom.customizable-product) and output its value when present. “Metafields” = custom data fields attached to products; scales better than hard-coding handles.

Progress and fixes:

  • #1 initially didn’t work, then OP got it working. Needed multiple products in one condition; solution provided:
    • Chain with OR: {% if card_product.handle == ‘A’ or card_product.handle == ‘B’ %}
    • Or use a list: {% assign custom_handles = “A,B” | split: “,” %}{% if custom_handles contains card_product.handle %}
  • Contributor recommends the metafield approach for maintainability as products grow.

Status: Working code provided; OP has a path for multiple products and an advised scalable option (metafields). No unresolved blockers noted.

Summarized with AI on December 25. AI used: gpt-5.

You are almost correct. In the if statement when you check for multiple conditions like card_product.handle == 'howah-crew-socks' or card_product.handle == 'howah-gel-orthotic-insoles' you need to use logical operators such as or(||), and(&&). In your case what you want to do is to check if the product handle is ‘howah-crew-socks’ or if the product handle is ‘howah-gel-orthotic-insoles’. So the corrected version of your statement is

{% if card_product.handle == 'howah-crew-socks' or card_product.handle == 'howah-gel-orthotic-insoles' %}
Customize

{% endif %}

So you need seperate the cases with ‘or’ and you can’t do this:

card_product.handle == ‘howah-crew-socks’ == ‘howah-gel-orthotic-insoles’

1 Like