Boost AI Search & Filter (aka PFS)
Version 0
Find the file
bc-sf-filter.jsFind the
var bcSfFilterTemplatevariable.Add
{{discountNinjaDataTags}}where the data tags should be placedAnd add the collection badge class where the collection badge should be displayed
And
<span class="la-dn-price">…</span>around the price section (if present), typically{{itemPrice}}Add this function before the
BCSfFilter.prototype.buildProductGridItemfunction.IMPORTANT: prices will be multiplied by 100
Avoid this by making the following change in the function: change
var pricesAreCents = false;tovar pricesAreCents = true;
Before the end of each of the
BCSfFilter.prototype.buildProductGridItemfunction, add the following code:
//Discount Ninja integration
itemHtml = itemHtml.replace(/{{discountNinjaDataTags}}/g, buildDiscountNinjaDataTags(data));Version 1
HTML Template
See V2
JavaScript
Find the file
boost-pfs-filter.jsFind the
var boostPFSTemplatevariable.Add
{{discountNinjaDataTags}}where the data tags should be placedAnd add the collection badge class where the collection badge should be displayed
And
<span class="la-dn-price">…</span>around the price section (if present), typically{{itemPrice}}

Add this function before the
compileTemplatefunctions.Before the end of each of the compileTemplate functions for the gridView (
ProductListItem.prototype.compileTemplate) and the listView (ProductGridItem.prototype.compileTemplate), add the following code:

Version 2
HTML Template
Find the file
boost-pfs-filter-html.liquidFind the
productGridItemHtmlandproductListItemHtmlsectionsAdd
{{discountNinjaDataTags}}where the data tags should be placedAnd add the collection badge class where the collection badge should be displayed
And
<span class="la-dn-price">…</span>around the price section (if present), typically{{itemPrice}}

JavaScript
Find the file
boost-pfs-filter.jsAdd this function before the
compileTemplatefunctions. (under “BUILD PRODUCT LIST”)Before the end of each of the compileTemplate functions for the gridView (
ProductListItem.prototype.compileTemplate) and the listView (ProductGridItem.prototype.compileTemplate), add the following code:

Find the end of the
Filter.prototype.afterRenderfunctionAdd the following code:

QuickView
Find the
product.boost-pfs-quickview.liquidfileAdd the following to the div with class boost-pfs-quickview-right product-details:
Add the following to the div with class boost-pfs-quickview-price
Below the block add the product banner
Search suggestions
Currently not supported. No template in Liquid files.
Version 3
With Version 3 the app doesn’t add any assets to the theme so we’ll have to use the CSS selectors approach.
Go to Discount ninja > Settings > Dynamic pricing > Theme Configuration and enable Mix mode:

It’ll unlock the second tab ‘ Live Theme ‘, go to this tab and enable ‘Custom’ option for Collection pages

Now go to Collection page and enable ‘Custom CSS selector’ and add the following classes:
Price (desktop) :
[[WRAP]].boost-sd__product-price-wrapper, .boost-sd__suggestion-queries-item-priceCard: .
boost-sd__product-item, .boost-sd__suggestion-queries-itemHandle:
[[HANDLE:href]]a.boost-sd__product-link

BuildDataTags function
Last updated
Was this helpful?