Bricks Boilerplate Documentation
PricingDemo
  • Intro
  • Getting Started
    • Requirements
    • 5 minutes launch ⚡
    • Import into an existing project
  • Basics
    • Inside the package
    • Global Styles
      • General
      • CSS Variables
      • Buttons
      • Utility classes
    • Templates
    • ACF
      • Global topbar
    • Bricks Boilerplate Addon plugin
      • Wishlist
      • Variation swatches
      • Checkout
    • Code snippets
  • Tutorials
    • Blog in 5 minutes
    • Custom Off-canvas cart
    • Off-canvas cart without addon plugin
    • Custom Thank you page
    • Custom Checkout page
    • Custom Cart page
    • My account page
    • Product gallery with thumbnails
    • Custom query for product reviews
  • Advanced
    • Custom slider controls
    • Custom accordions
    • Megamenu
    • GSAP animations
  • Common issues
    • Custom CSS
    • Product galleries
    • Restoring site with WPvivid
Powered by GitBook
On this page
  • Create and select type of attribute
  • Display swatches in query loop (products)
  • Display swatches in single template (products)
  1. Basics
  2. Bricks Boilerplate Addon plugin

Variation swatches

PreviousWishlistNextCheckout

Last updated 7 months ago

This feature comes with 2 elements "Swatches Loop" and "Swatches Single". They are meant to be used inside query loop for products and in product single template. They will change the appearance of products variants based on selected attribute type.

Create and select type of attribute

Go to Woocommerce > Products > Attributes and create a new attribute. Make sure to select on of these types:

  • Color

  • Button

  • Image

Then add terms for your new attribute. Based on the selected type you might need to upload its image (image type) or select a color (color type).

Display swatches in query loop (products)

In a query loop, add Swatches loop element. Select attributes you want to display:

Enter a class of container that contains this swatches loop element and everything related to this product, it is usually a product card container.

Then enter a class of product image so the image can be changed when the attribute option is selected (e.g. Yellow skirt has a different image).

Display swatches in single template (products)

For this purpose we have "Swatches Single" element which has identical controls.

If you want to use swatches in quick view popup (Popup), use Swatches Single element.