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.

magento-add-size-attribute-to-products

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.

magento-2-add-size-attribute-to-products

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.

magento-2-create-product-configurations

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.

magento-2-create-new-product-attribute

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

magento-2-product-attribute-required-values

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

magento-2-add-product-options

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.

magento-2-add-product-categories

Select size options on the next screen.

magento-2-select-product-size-options

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.

magento-2-product-images-attributes

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.

magento-2-generate-products

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

magento-2-generate-products

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’.

magento-2-choose-product-attribute-set

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

magento-2-product-frontend-size-chart

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: