Variation swatches
Last updated
Last updated
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.
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).
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).
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.