Skip to main content
All CollectionsThird-Party App IntegrationProduct Label
Flair Product Badges & Banners Integration Guide
Flair Product Badges & Banners Integration Guide

Here is the guide for Flair Product Badges & Banners Integration with Boost AI Search & Discovery app.

Thomas Ta avatar
Written by Thomas Ta
Updated over 4 months ago

πŸ“– Here is the guide for Flair Product Badges & Banners Integration with Boost AI Search & Discovery app.


About Flair Product Badges & Banners

App Information

  • Flair Product Badges & Banners make it easy to promote products and promotions so customers will take notice, which should translate to more profit.

Integration function

  • The integration between Flair and Boost AI Search & Discovery increases sales by showing product labels, badges & banners in the product item while filtering.


How to integrate Flair with Boost AI Search & Discovery

⚠️ This feature only works with Boost AI Search & Discovery V2 and above. To find out which version of our app your store's current theme is installed with, please follow this article.

Select one of the Versions below for the app version that your theme is installed with (if you have not known it, yet, please follow this article to find out): V2 or V3 or Turbo. Then follow its corresponding Step 3.


V2

1. (V2)

Please make sure to turn ON the Javascript API in Flair setting:


​ 2. (V2)

Copy the following snippet & choose the position of Flair item:

Please check if the file boost-pfs-filter-html.liquid file is available in your source code.

If yes, please copy the following code snippet:

[[itemFlairHtml]]

If no, please copy this one instead:

// For boost-pfs-filter.js file'{{itemFlairHtml}}' +

3. (V2)

Paste it inside the block productGridItemHtml, where you want your FlairHtml to appear, for example, under the product title:


​

If productGridItemHtml variable does not exist, please look for it in the file boost-pfs-filter-html.liquid:

4. (V2)

Go to the boost-pfs-filter.js file in your current theme & copy the following snippet:
​

Add the below script to the ProductGridItem.prototype.compileTemplate function:

ProductGridItem.prototype.compileTemplate = function(data) {
// Existing logic to build itemHtml...

// Add the code at the end of function before the close bracket
var itemFlairHtml = '<div data-flair-product-id="' + data.id.toString() + '"></div>';
itemHtml = itemHtml.replace(/{{itemFlairHtml}}/g, itemFlairHtml);

// Add main attribute (Always put at the end of this function)
// Your additional main attribute logic here

return itemHtml; // Ensure to return the modified HTML
}

Add the below script to the ProductList.prototype.afterRender function:

ProductList.prototype.afterRender = function(data) {
// Existing logic or actions based on data...

// Add the code at the end of the function before the close bracket
if (typeof FlairApp !== 'undefined' && FlairApp) {
FlairApp.refreshProductBadges();
}
/*****************/
};

5 (V2)

Click Save and you're all set!


V3

1. (V3)

From your Shopify admin, go to Online Store > Themes.

2. (V3)

Find the theme you'd like to integrate the app and click Actions (β‹―) > Edit code.

3. (V3)

In Asset folder, locate a file named boost-sd-custom.js.

4. (V3)

Add the code snippet below to the boost-sd-custom.js file:

if (window.boostSDAppConfig) {
window.boostSDAppConfig.integration = Object.assign(
{ labels: 'flair' },
window.boostSDAppConfig.integration || {}
);
}

5. (V3)

Click Save and you're all set!


Turbo

Go to Boost AI Search & Discovery > Integration > Third-party Integration > Product Label tab > Toggle on Flair Product Badges + Labels > select Okay, integrate now.

Recording 2024-07-19 105142.gif

⚠️ Please be aware that within each 3rd-party app integration category, only one app can be active at a time. Therefore, if you'd like to integrate another 3rd-party product label app, it's recommended to manually toggle OFF this app to avoid any conflict > Select Remove to confirm your action.

Recording 2024-07-19 110053.gif

πŸ’ͺ In other case, even without toggling off the integration, when you enable another app within the same category, the previously active app will be automatically disabled after your confirmation.

If you encounter any issues during the integration process, please don't hesitate to contact our support team for further assistance at [email protected].

Did this answer your question?