Badge Integration Guide with Online Store 2.0 Themes

Adding a Smart App badge code to your theme is a one-time activity that, once done, you do not have to worry about later.

Steps:

1. Go to your Shopify admin.

2. Click Online Store > Themes > Actions.

Screenshot 1

3. Click Edit code.

Screenshot 2

4. Add the following code where you'd like the badges to show: 

{% render 'smartb', product: product, hideAssets:'1', smartbGroup:'1', smartbInnerClass: 'smart-d-inline-block  smart-mb-1' %}

To show the badges on the product pages, place the code in the sections/main-product.liquid file. Search for {{ product.title }} and place the above-mentioned code in the next line. This will display the badges below the product title.

Screenshot 3

Similarly, the Prime app badge code can be placed on the collection page. Look for the snippets/product-card.liquid file. Add the code below the product title or the place where you want to display the badges.

Expected Result

Your Badges content appears on matching product pages as well as collection pages after integration and publishing.

Need help? Contact [email protected].

Related Articles