Product variants are coming

   —   
In Kentico 8 the store manager will be able to manage product variants (e.g. red T-shirt in medium size, green T-shirt in large size) as separate products with their own price, SKU number and inventory fields.

Last time, I introduced you to the improvements in configurable products, which significantly simplify their creation and management. This article describes the way you can handle product variants when offering configurable products to your customers:

1) Easier creation of configurable products
2) Product variants
3) Highly flexible discounts and promotions
4) Create and optimize your checkout process with ease

What is a product variant?

Imagine you offer your customers a T-shirt in different sizes (S, M and L) and different colors (red, green). If this is possible, than the following product variants can be purchased by a customer as well:
  • S, red
  • S, green
  • M, red
  • M, green
  • L, red
  • L, green
In fact, the same configurable product can be defined in this manner also in Kentico 7; however, you are not able to define the inventory, SKU number and price for each product variant. And this is exactly what the support for product variants in Kentico 8 is all about.

Defining product variants

Now, let's have a look at the way a store manager can easily define product variants. The goal of my example is to create a configurable T-shirt in different sizes and colors. What's more, I would like to offer an optional cap and allow customers to customize the label that will be printed on a T-shirt:




1) First, you as a store manager, need to create a standard product, in this case a T-shirt.

2) Now you need to switch to the Option categories tab to add or create required option categories. I added Color and Size categories (they are a category type called Attribute which allows options to be combined in order to create product variants). I also added Custom label (this is a category type called Text that allows customers to enter a custom label for the T-shirt) and Accessory (this category type is called Product which allows customers to select an optional product for the T-shirt).




3) You can stop now if  you don't want to manage T-shirt variants as separate products, i.e. products with their own inventory, SKU number and price. But I wanted them to be tracked in this way, so I switched to a new Variants tab to create the required product variants.




4) You click on the Define available variants button. You can see a list of the assigned Attribute type option categories (Size, Color). Other types of option categories (Text, Products) are not available because variants cannot be created from their options.




5) The next step is to select the option categories you want to be used within product variants (at least one must be selected to create a variant). I selected both Size and Color. This ensures reloading of the table with all possible product variants. I have the Size category with S, M and L options and the Color category with red and green options. This means that there could be 3 * 2 = 6 product variants. I want them all to be offered to my customers so I checked them all. Of course, variants that are not defined can't be added to the shopping cart and bought.




6) When you click the Save button, the selected variants are automatically created. The name, SKU number and price of each variant are defined as follows:
  • The variant name includes the parent product name and product option names in the brackets, e.g. T-shirt with custom label (red, S)
  • The variant SKU number includes the parent product SKU number (if there is any) and product option names (empty spaces are replaced by the dash), e.g. red-S
  • The variant price is copied from the parent product, i.e. $20.
Of course, all these properties can be modified. What's more is that you can change the logic of generating product variants by overriding one API method, e.g. you can use underscore instead of the dash as a replacement of the empty spaces.




7) Once you create the variants, you can edit their properties just like the properties of any other objects. Furthermore,  you can use in-line editing to edit the name, SKU number and price. For each variant you can also specify different shipping parameters and inventory.


And that's it! I'm sure you can see from the little demonstration above that the creation of product variants is pretty fast. This means that automated generation of product variants saves store managers a lot of time and allows you to focus on the business itself instead of creating hundreds of variants manually. 

As always, any feedback is appreciated! Next time I will write about our new flexible discounting system in Kentico 8. Stay tuned!

Share this article on   LinkedIn Google+

Petr Vozak

Product Owner responsible for Kentico E-commerce Solution. He writes about its new features, future plans and all related stuff you might be interested in.

Comments

Josef Dvorak commented on

Hello Sloven,

You can find an example of how to crate Product option, and then use it with a product to create Variant in the API Examples application, which is part of standard Kentico projects. Please post further technical questions to the Q&A section, or send them to use via email to support@kentico.com.

Sloven commented on

Hello Petr, could you explain necessary steps to create variant programmatically via API ? I can't find any documantation related to VariantHelper class and don't know how to deal with it. I'm trying to create a Product with Categories and Options but no luck for now.

Nortech commented on

Great news Petr! It saves us a lot of custom coding!