Magento 2E-CommerceHow To GuideMay 27, 2024Simon Walker

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?

In an ever-increasing competitive eCommerce landscape, the key to long-term success is providing a seamless shopping experience. Magento 2, a leading eCommerce platform, offers a wide range of features for this very purpose. One such feature is the ability to set default options for a configurable product.

Understanding Magento 2 Configurable Product Default Option

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 – size, colour, 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 buy a simple product that has been assigned to the configurable product.


Preselect Configurable Product

Enhance your customers' shopping experience with the Magento 2 Preselect Configurable Product Extension.

preselect 1st swatch attribute of configurable product

Why Auto Select the First Child Product of a Configurable Product?

There are several reasons why store owners should consider setting up a Magento 2 configurable product default option.


Configurable products come with too many options. For example, just consider an online sportswear shop. Apart from the size, you may have options for colour, fabric, and other customisations. When no default option is selected, a user must configure each option themselves. This requires considerable thinking and effort.

In most cases, a user will likely close the tab to save themselves the hassle. Remember, not every user is 100 per cent sure about what they want. In some cases, the store must guide them. By providing a default option, you are giving them a chance to buy the product as is made available rather than go through any hassle.

Less Hassle

Since users don’t have to go configure the product manually, they have to go through less hassle. This reduces the cart abandonment rate which is already quite high worldwide as shown below.


Source: Statista

Improved Conversion Rates

By simplifying the process and reducing the hassle, your store will benefit from a noticeable improvement in the conversion rates. This can improve your store’s bottom line, giving you a much-needed financial boost.

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

Implementing Magento 2 Configurable Product Default Option

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


This concludes our article on how to auto select the first child product of a configurable product. As you can see, our extension makes the process a lot easier than you would expect. After setting up the extension, 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: