Frenzy AI Personalization
  • Welcome to the Frenzy docs
  • Shopify App
    • Product Feed Sync
    • Install Components
    • Configuring Product Card
      • Custom Data
      • Reviews
      • Wishlist Icons
      • Quick Views
      • Swatches
      • Testing Product Cards
    • Search & Collections
      • Merchandising
        • Sorting
        • Rules
      • Filters
        • Filter Trees
    • Recommendation Widgets
      • Widgets
      • Data Sources
    • Synonyms
    • Global CSS
    • Tutorials
      • Search & Collection Page Merchandising
        • How to Bury Products Globally on all Collection Pages
        • How to Pin Products in Collection Group
        • How to Bury Sale Products Globally on all Collection Pages
        • How to Sort a Collection Page based on Newly Published/Created Products
        • How to Bury Sale Products Globally on all Search Pages
        • How to Hide Products on Search Pages Globally
        • How to boost products (using tags) for a Search Query
        • How to turn on Personalization on Collection Groups
        • How to show Shopify Merchandising on Collection Groups
        • How to bury Out Of Stock Products in Collection Groups
        • How to turn on Personalization on All Search Result Pages
        • How to setup top 10 automated Bestsellers Collections
        • How to Group Products using Tags on Collection Pages
        • How to setup custom products groups on Collection Pages
        • How to Group Products using Tags on Search Pages
        • How to set-up an A/B test on Search and Collection pages
      • Recommendation Carousels
        • How to change the title of the Carousel
        • How to set up an A/B test on a recommendation carousel
        • How to add a collection based homepage carousel
        • How to add 'Selected for You' homepage carousel
        • How to add 'Best Sellers' homepage carousel
        • How to Hide Products in Recommendation Carousels
        • How to create Manual Product Based Carousel
      • Filters
        • How to create filters from Product Tags
        • How to create filters from Product Metafields
        • How to create filters from Color Variants
      • Synonyms
      • Swatches
  • API Functions
    • Search
      • Search API Call
      • Suggest API Call
    • Carousels
      • /recommendation
      • /pair-with
      • /personalized-recommendation
      • /most-clicked-skus
      • /add-cart
    • Sharing Event Data
      • Google Tag Manager
      • API Call
    • product-data
  • Support
Powered by GitBook
On this page

Was this helpful?

  1. Shopify App
  2. Configuring Product Card

Custom Data

To add custom data like Product Tags, Labels, Metafields, Reviews, Wishlist, Quick View, etc, to the product cards.

PreviousConfiguring Product CardNextReviews

Last updated 9 months ago

Was this helpful?

  1. Product Card functionality can be extended by using Callback Functions.

  2. All Frenzy Callback functions are added to snippets- frenzy-callback-function.liquid file

  3. In Shopify Code Editor create a file under snippets- frenzy-callback-function.liquid.

  4. Create a function window.FrenzyProductGridChangeCallBack.

  5. This function takes 2 arguments- html, data.

  6. 'html'-> contains the product card, 'data'-> contains the JSON object for product data.

  7. 'data' object contains all the keys for Product Tags, Labels, Metafields, etc.

  8. The keys in the 'data' object is controlled from the Dashboard. (Search & Collections -> Filter Settings -> Extra Properties -> Response Fields. Below is an example image. This is done to limit the data in the API response and maintain the platform speed.

  9. The list of keys/internal names can be selected from Search & Collections -> Filter Settings -> Filter Options -> Internal Name.

Below is an example of FrenzyProductGridChangeCallBack function. This example shows how you can use a custom fields in the 'data' object to create a custom anchor tag using 2 custom keys - frenzyBrandLink and st_tag_brand.

<script>

window.FrenzyProductGridChangeCallBack = async function(html, data){

var st_tag_brand = html.querySelector(".card-vendor");
st_tag_brand.innerHTML = '<a class="mobile-url" href="'+ data.frenzyBrandLink+'" title="'+data.st_tag_brand[0]+'">Brand: <b>'+data.st_tag_brand[0]+'</b></a>';

}

</script>