Why honest badges matter
Fake urgency (“Only 2 left!” on everything) is easy to spot and breaks trust, and consumer rules in many countries treat it as misleading. Badges based on real sales and stock give shoppers useful information: this is popular, this might run out.
Option 1: no code
- 01Install StoreAi and turn on autopilotBadges are worked out each time the merchandiser sorts a collection (Growth and Pro).
- 02Product pagesTheme editor → product template → Add block → StoreAi badges. Place it under the title.
- 03Collection and search pagesTheme editor → App embeds → StoreAi badges on cards. Labels sit on the product image with no layout shift.
Option 2: your own Liquid
Badges are stored in the storeai.badges product metafield as a list, so you can place them anywhere. In Dawn, product cards live in snippets/card-product.liquid, where the product is card_product:
snippets/card-product.liquid
{%- assign badges = card_product.metafields.storeai.badges.value -%}
{%- if badges and badges.size > 0 -%}
<span class="badge storeai-card-badge">{{ badges.first | escape }}</span>
{%- endif -%}The developer page has the full metafield reference and more snippets.
When each badge shows
- #1 in {type}: best seller of its product type over 30 days, in a type with at least 3 products, with at least 3 sold.
- Low stock: in stock, still selling, under 7 days of stock left at the current pace.
- Selling fast: among your fastest sellers, with at least 5 sold in 30 days.
Questions
- Can I show badges without the merchandiser?
- Badges are worked out from the same numbers as sorting, so a collection needs autopilot on. You can still keep your own order by pinning products.
- Will they work with my theme?
- The product block works in any Online Store 2.0 theme. For unusual card layouts, use the Liquid snippet.