Custom Badge
Override the default sale badge with custom text per product.
By default, DRIFT shows an automatic "SAVE XX%" badge on products that have a compare_at_price set higher than the regular price. The custom badge metafield lets you override that with your own text — useful for "NEW", "LIMITED", "RESTOCK", "MEMBERS ONLY", whatever fits your brand.
How DRIFT picks what badge to show
DRIFT checks in this priority order:
custom.badgemetafield — if set, this overrides everythingProduct tags starting with
badge:— e.g., a tag likebadge:NEWshows "NEW"Auto sale badge — if
compare_at_price > price, shows "SAVE XX%"Nothing — no badge at all
So the metafield is the highest priority. If you set it on a product, that's what shows up.
Sold-out products show no badges, regardless of the priority above. A "SAVE 33%" pill on a product the customer can't actually buy is misleading; the "Sold Out" label on the product card / ATC button already communicates the state. So once product.available is false, all badges are suppressed.
Setting up the metafield
Shopify admin → Settings → Custom data → Products
Add definition
Fill in:
Name: Custom Badge
Namespace and key:
custom.badgeType: Single line text
Validations: optional (you can cap character count if you want — anything over ~12 characters starts to look cramped)
Save
Using it on a product
Open any product in admin
Scroll to the Metafields section at the bottom
Find Custom Badge
Type your text (e.g.,
LIMITED)Save
Refresh the storefront. The product card and PDP now show your custom badge instead of the auto sale badge.
Tips
Keep it short — 8–12 characters max. "MEMBERS ONLY DROP" wraps and looks bad. "LIMITED" looks clean.
All caps reads best — DRIFT's badge styling is designed for caps. Lowercase looks softer if that's your brand though.
Use sparingly — if every product has a badge, none of them stand out. Use badges on the 5–10% of products that genuinely need attention.
When to use the tag-based approach instead
If you have a big collection of products that need the same badge (e.g., a "NEW" drop where 30 products all need "NEW"), tags are faster to manage:
Add
badge:NEWas a tag to all 30 productsDRIFT renders "NEW" on all of them
When the drop is no longer new, just remove the tag in bulk
Tags use the same priority slot — if you have BOTH a metafield AND a tag, the metafield wins.
Removing a badge
To remove a custom badge, just clear the metafield value (delete the text). The product reverts to whatever the next priority shows — either a tag-based badge, an auto sale badge, or nothing.
Translations
The auto-calculated "SAVE X%" sale badge is translated via Shopify's locale system (products.product.sale_badge). DRIFT ships with translations for 30+ locales out of the box — Spanish (AHORRA X%), French (ÉCONOMISEZ X%), German (SPARE X%), Japanese (X%オフ), Korean, Chinese (CN/TW), and more. The active storefront language picks the right one automatically. No setup required.
Last updated