Boost AI Search & Filter (aka PFS)
Last updated
Was this helpful?
Last updated
Was this helpful?
Find the file bc-sf-filter.js
Find the var bcSfFilterTemplate
variable.
Add {{discountNinjaDataTags}}
where the data tags should be placed
And add the class where the collection badge should be displayed
And <span class="la-dn-price">…</span>
around the price section (if present), typically {{itemPrice}}
Add before the BCSfFilter.prototype.buildProductGridItem
function.
IMPORTANT: prices will be multiplied by 100
Avoid this by making the following change in the function: change var pricesAreCents = false;
to var pricesAreCents = true;
Before the end of each of the BCSfFilter.prototype.buildProductGridItem
function, add the following code:
See V2
Find the file boost-pfs-filter.js
Find the var boostPFSTemplate
variable.
Add {{discountNinjaDataTags}}
where the data tags should be placed
And <span class="la-dn-price">…</span>
around the price section (if present), typically {{itemPrice}}
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 file boost-pfs-filter-html.liquid
Find the productGridItemHtml
and productListItemHtml
sections
Add {{discountNinjaDataTags}}
where the data tags should be placed
And <span class="la-dn-price">…</span>
around the price section (if present), typically {{itemPrice}}
Find the file boost-pfs-filter.js
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.afterRender
function
Add the following code:
Find the product.boost-pfs-quickview.liquid
file
Add 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
Currently not supported. No template in Liquid files.
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-price
Card: .boost-sd__product-item, .boost-sd__suggestion-queries-item
Handle: [[HANDLE:href]]a.boost-sd__product-link
And add the where the collection badge should be displayed
Add before the compileTemplate
functions.
And add the where the collection badge should be displayed
Add before the compileTemplate
functions. (under “BUILD PRODUCT LIST”)
Below the block add the