Skip to main content
All Frenzy Components (search, collection, recommendation, etc.) use the Product Card. The Product Card can be customized from the Frenzy Shopify Dashboard.
  1. Go to Settings -> Product Grid Widget.
  2. This section contains the HTML structure used to define the Product Card.
  3. Developers can customize the Product Card based on the requirements.
  4. This HTML structure uses some standard tags to fill in the information like Title, Price, Image, etc. These tags are listed below in Template variables.
  5. The Styling of the Product card and other components is added from frenzy-css.css file in theme assets or through Settings -> Global CSS.
Image

Enable the new product cards

The new product cards render each card with React from the same HTML template. They are required for Swatches, the Image Swiper and infinite scroll.
Without this flag Frenzy uses the old HTML cards. If a store enables infinite scroll without useNewProductCards, the grid does not render.

Where to add the code

All the options on this page and on the Swatches and Image Swiper pages are global variables (window.*). Add them in the Frenzy callback file, assets/frenzy-callback-function.js, at the top level.
assets/frenzy-callback-function.js

Template variables

Use these tags in the Product Card HTML. Frenzy replaces them with the product data.

Card behavior

  • Secondary image on hover (grid_show_secondary_image = "1"): only works on desktop, and it is turned off when the Image Swiper is active.
  • Extra first image: window.frenzyImageKeyName puts an image from a product field first in the image list. Only on cards without swatches.
  • Add to cart follows the Frenzy settings (product_option_type, stop_direct_add_to_cart_button). If no variant is selected, the first variant with stock is used. When the card has swatches, the selected swatch’s variant is used.

Card render hook

window.productCardOptions.onCardRender is called once per card after it mounts. It receives productCardElement, product, productId, sku, classType, swatches, selectedSwatch and selectedSwatchIndex. Stores can use it to patch the card DOM without touching the bundle.

Example: add the product type as a data attribute

Example: add a badge to cards with a product tag

If window.productCardOptions already exists in the assets/frenzy-callback-function.js, add ‘onCardRenderer’ to that object instead of creating a new one. Assigning a new object replaces the swiper settings.