← All modules

Magento 2 module · foundation

Catalog Product Swatches

Groundwork for other Infrangible modules: shows variant-specific product information on configurable product pages as soon as the shopper selects a variant.

On a configurable product page, Magento only updates price and images when the shopper picks a variant. This module is a building block that lets other Infrangible modules display further information of the selected variant, for example an attribute value that differs between the variants. It keeps track of which variant matches the selected options and updates the registered information whenever the selection changes.

Features

  • Detects the variant that matches the options selected on a configurable product page.
  • Lets other modules show attribute values of the selected variant on the page, including values of multi-select attributes.
  • Informs other modules whenever the selected variant changes.
  • No visible change in the store on its own.

Configuration

There is nothing to configure. The module works right after installation.

Good to know

Merchants normally do not install this module directly. It is pulled in automatically by modules that need it, for example “Catalog Product POS” and “Catalog Product Option Composite”. A companion module, “Catalog Product Swatches Hyvä Theme”, provides the same groundwork for stores using the Hyvä theme.

Installation

Install the module with Composer in your Magento root directory:

composer require infrangible/m2-catalog-product-swatches

Then enable it and update the store as described in the installation guide. Composer installs the required modules listed on this page automatically.

Using the Hyvä theme? Also install the companion module Catalog Product Swatches Hyvä Theme:

composer require infrangible/m2-catalog-product-swatches-hyva