In the first part of “How To Create a Theme in Magento 2” we were talking about theme declaration, registration, applying in the admin panel and Composer.json file addition. Now it’s time to continue.
A configurable product is a widely used type of product. It looks like a regular product but in addition it has a possibility to choose between options that are located in the drop-down list. Each combination is a unique Stock Keeping Unit. It is possible to track each product variation in the store.
Let’s be more specific and take a look at the example.
You sell T-shirts. Let’s say there are 5 sizes and 5 colors of T-shirts in your stock.
In general you have 25 variations. And if you create a single product for each combination, it takes a really long time. In this case creating a configurable product is the best idea. In general, it is probable that the products that you sell have variations, so, you need to know how to put them into your shop.
How do you proceed if you need to create a new configurable product?
First step is to create Attributes for your products.
Color is an attribute. Blue is an attribute value.
Size is an attribute. XL is an attribute value.
Second step is to actually create a Configurable product.
You go in your admin panel in Magento 2 and choose Products → Catalog (you click on Catalog) and you see the orange tab “Add Product”. You choose “Configurable product” from the dropdown list.
The next step is to fill in all the fields (or at least the required ones). After that you scroll down to the button “Create Configurations”.
For example, your T-Shirt can be described by 2 attributes: Color and Size.
Therefore you select Color and Size. And then you press “Next”.
*If necessary attributes are not yet in the list, you can add new ones on the spot by clicking at “Create new attribute”.
Then you select colors and sizes of the product that you are selling.
Then you press “Next”.
In the step 3 you can upload the images for each set of attributes. In case of T-shirts it is better to upload an image for each color. Here you choose “Apply unique images by attribute to each SKU” and in the tab “select attribute” you choose “Color”.
After it is done, you actually upload an image for each color.
Then scroll down to the section “Price”. If you have different prices for different colors, you need to select “Apply unique prices by attribute to each SKU”. But in our case the price is the same for all combinations, so I select “Apply single price to all SKUs”.
And we have 10 T-shirts of each combination (10 blue T-Shirts of S size, 10 blue T-shirts of M size etc.)
Then you scroll up and press “Next”.
Let’s take a look at the result. Yes, we have 10 articles for each combination and a single price for every combination. It’s almost done.
You need to press “Generate products”.
Now you can manage the product and all of its configurations in the Catalog.
Hope that I’ve been helpful.
In case you have questions, do not hesitate to write a comment or send me a message directly at email@example.com.