- Go to Sales | Configuration | Setting and enable the option Products can have several attributes, defining variants (for example—size, color, and so on) and click on the APPLY button to activate the Product variant feature.
- When the variant feature is enabled successfully, you will find a new VARIANTS tab added to the product form.
Go to Sales | Sales | Products and select the product for which you would like to create the variants. Let's take an example of iPhone 7. It has a variety in terms of color and memory capacity:
You can add Attribute and Attribute Values to create the product variants. The attribute is Color in our case and Jet Black, Black, Silver, Gold, Rose Gold, and Red are the attribute values.
- The product's Attribute Type has to be configured correctly when you are going to use the product attribute on the product web page. The Attribute Type can be a type of Radio, Select, Color, or Hidden.
The Attribute Type field is used to define, how the attribute will be displayed on the product page:
-
- Radio: You can see all the options but choose only one. Choose this when you have a maximum of two or three options.
- Selection: You have a drop-down selection box to choose the options from. Choose this when you have more than three attribute values to choose from.
- Color: Select color when your attribute values have to display the color on the page.
- Hidden: This attribute value will not be displayed on the product page for the selection.
- As soon as you created the variant lines and defined the Attribute and Attribute Values, click on the SAVE button to save the product configuration. Product variants will be created with a combination based on the attributes and attribute values:
The number of variants will be displayed beside the Variants button. When you click on the button, you will go to product variants created based on the attribute and its values. A total of 24 variant products are created with the combination of four storage and six color attributes:
Information such as Barcode, Cost price, and Image can be set directly on the product variant. Click on any product to open its form view and set the value:
It is advisable to uncheck the Active field on the Product variant form if any of the Attribute combination is available as a product.
- To set the additional price for the variants, first go to product form view and set Sale price for iPhone:
- Click on the VARIANT PRICE button. Go to the variant price list, where you can set the additional price per variant:
- Click on the SAVE button to save the price updated on variants. Go back to iPhone and click on Variants to get the list of variants. You can see the sale price computed for all the variants of iPhone:
The iPhone's with Storage of 128GB and 256GB has a higher price than the 32GB store capacity phone; the color attribute is not adding any extra price, only the storage capacity adds an additional cost to the final price.
- You are ready to go to frontend and check the configuration of variants on the Product page. Click on the Published on Website button to view the online product page. On the right panel, the product name appears; below the product name, you can see all the product attributes and values.
- To make the product page more interactive, you can select the attribute value and change the photo of the product. Let's select the Rose Gold color on the Color Attribute: click on the EDIT button on the page, by clicking on the image a popup will appear, choose the relevant photo for the Rose Gold color.
Save the changed image by clicking on the SAVE button. Now when you click on the Black Color you can see the iPhone in black; the photo will change when you click on the Rose Gold color on the Color Attribute.