Magento 2: How to Auto Select the First Child Product of a Configurable Product?

Magento 2: How to Auto Select the First Child Product of a Configurable Product?

A configurable product is a simple product but with multiple variations. For example, a T-shirt has small, medium, and large size variations. It also has more than one attribute—for example, size, color, material, etc. Customers can choose attributes combinations according to their choice.

A configurable product is often called ‘parent’ because we assign simple products (‘child’) to it. These simple products act as configurable product variations. When customers select a variation (child) and add it to cart, they actually buy a simple product that has been assigned to the configurable product.


preselect 1st swatch attribute of configurable product

Why Auto-select the First Child Product of a Configurable Product?

By default, there is no selection of any combination or variation of a configurable product. This might confuse customers. Also, they would need more mouse clicks to add a preferred product combination to cart. By auto-selecting the first child product, they can add the first combination to cart with a single click. This improves customer's experience and increases the sales of popular child products. Customers usually prefer the first choice as it seems easy and optimal.

How to Pre-select the First Option of a Configurable Product?

Although you can programmatically pre-select the first swatch attributes of a configurable product, the chances of going wrong are higher if you are not an expert developer. Moreover, it’s time-consuming. Our Magento 2 Preselect Configurable Product extension provides the easiest and the most effective solution. It allows you to preselect any of the following four options by default.

  • The first option
  • The default option
  • The cheapest option
  • The most expensive option

The extension also allows you to display the pre-selected options on category pages.

preselect 1st swatch attribute in configurable product

How to Implement?

After installing the extension, log in to your admin panel.

  • On the left sidebar, click FME Extensions -> Configuration.
  • Choose the First Option Preselect option in the Choose Option of Your Choice dropdown.
  • Click Save Config and Clear the cache.
auto select configurable product

That’s how easy it is. The first option of all configurable products will now highlight on page load.

If you still have any issues then feel free to contact our Support team

. Other Articles You Might be Interested in: