Product badges are labels which appear on images of certain products, on your product and collection pages, when there is noteworthy information about the product available.
By default, there are two badges which the theme automatically applies to products:
- Sale (displays on any item in your shop if you have set a Compare at price in your admin settings)
- Sold out (appears on any product that is out of stock according to Shopify’s own inventory tracking feature)
Step 1: Define a badge metafield
You can create custom badges by adding metafields to your product.
- Within your Shopify admin, go to Settings.
- Go to Metafields.
- Select Products and click Add defition.
- Provide a name and key for your metafield.
- From the content type select Single Line Text.
Step 2: Assign metafields to your products
You can now assign your metafields to your products.
- Within your Shopify settings, go to Products.
- Select the relevant product.
- Scroll down to the metafield option and select the metafield you defined above.
- From here, you can add the text you want to appear in your badge.
Step 3: Set up Product Badges on your store
To ensure your badges are showing as expected on your store, edit your Product Badges’ settings.
- Within the theme editor, scroll down to Product Badges.
- Add a Custom Badge block.
- Enter the metafield key for your custom badge metafield.
Step 4: Prioritise your badges
You can limit the number of badges shown on your products, as well as the order in which they appear by editing the Product Badges’ settings.
- Within the theme editor, click on Product Badges and set the maximum number.
- The order of the badge blocks within the settings dictates the order in which they will appear on your products. Simpy, reorder these blocks, top to bottom, to ensure your badges are shown in the correct order.