Magento 2How To GuideMarch 17, 2021

How to Add Size Attribute in Magento 2?

How to Add Size Attribute in Magento 2?

Ecommerce stores that sell wearable products or products that require sizing options need to provide customers a detailed size chart. Examples of such products include clothes, shoes, shirts, tiles, blinds, etc. Various sizing options allow customers to choose the one they think will fit them. This contributes a lot to a great shopping experience.

The unavailability of sizing options leads to confusion that in turn results in cart abandonment and returns.

In this step by step guide, we are going to show you how to add a custom size attribute in your Magento 2 store.

Quick Note: Check our premium Magento 2 Size Chart Extension

Adding Custom Size Attribute to Configurable Product

Log in to the store’s Admin panel and go to Catalog > Products. Select ‘Configurable Product’ on the ‘Add Product’ dropdown menu.


Fill out the necessary fields: Product Name, SKU, Price, and other optional fields. Set Enable Product to ‘Yes’ if you want to enable the product for all the Store Views as soon as you configure it. You may also set this option to ‘No’ to select a necessary Store View for the product later on, as the Store View selection appears only when a product is saved.

You may leave the quantity field blank, as QTY may vary depending on product variations.


After you’re done with product settings, proceed to the Configurations section and click the ‘Create Configurations’ button to add size configurations to the product.


Adding Size Attribute

If you don’t have a size attribute yet, you need to create it. Click the Create New Attribute button to do so.


Give the attribute a label and select the input type. You can also make the field necessary or optional using the ‘Values Required’ option.


Now click the Add Option button to enter titles for different sizes.


There are other optional attribute and storefront properties which you can configure. When you are done, click Save Attribute.

Mark the checkbox of the new category you’re going to assign to the product and click the Next button. Select the appropriate attribute values.


Select size options on the next screen.


The next screen will allow you to configure bulk images, price, and quantity for the new products. A new product will be created for each size option. For example, if you have selected 5 different size options, 5 new products will be created and you can choose to set a different image, price, and quantity for each product.


Click Next to go to the Summary. You can also go back if you need to make some changes. When everything looks good, click Generate Products.


The new generated products will be displayed in a grid as shown in below image:


When you click Save on the upper right corner to publish the product, the following popup window appears. Select the appropriate option and click ‘Confirm’.


Your product will now be displayed on the frontend in 5 different sizes.


That’s all about adding size attribute in Magento 2. This is as straightforward as it seems. However, no question is a wrong question so don’t hesitate to contact us in case you have any questions related to this article.

Related Article Recommended for you: