Custom Product Badges
Theme versions 2.4.10 and upwards support custom colors for your product badges via metaobjects. Follow the below steps to set them up.
Step 1: Create a Label
metaobject.
Label
metaobject.Include the following attributes.
Label Text ->
label.label_text
Text Color ->
label.color
Background Color ->
label.background_color
Step 2: Link the metaobject to a Product metafield
Create a product metafield called Labels
and ensure its namespace is smart.labels
The new Label metafield should be a list of type Mixed Reference. The metafield should reference the new Label
metaobject that you created in step 1.
Step 3: Populate the metaobject for the desired product(s)
Navigate to the Products section of your Shopify backend and populate the metaobject that you created.
Step 4: Check that it works!
You should see a custom badge (or list of badges) on your product cards.
Last updated