- Product Card functionality can be extended by using Callback Functions.
- All Frenzy Callback functions are added to snippets-
frenzy-callback-function.liquidfile - In Shopify Code Editor create a file under snippets-
frenzy-callback-function.liquid. - Create a function
window.FrenzyProductGridChangeCallBack. - This function takes 2 arguments- html, data.
- ‘html’-> contains the product card, ‘data’-> contains the JSON object for product data.
- ‘data’ object contains all the keys for Product Tags, Labels, Metafields, etc.
- 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.
- 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.