Let us use a simple example to show what product variants are and why you may need to use them.
For instance, we have some plates with kitty print that we want to sell at our store. The plates are the same, but the kitty print comes in different colors and patterns. So first, we have plates with blue, mint, and orange kitties in a solid color:
Second, we also have plates with blue and mint kitties that come in a dotted pattern, but we don't have plates with an orange dotted kitty:
We want to sell the plates of each type separately, and we need to add them to our store's catalog so that customers can choose the color and pattern of the kitty on the plate. We want to set the price of solid color kitty plates at $12 per unit and dotted kitty plates at $12.50 per unit.
The most obvious solution for us, in this case, would be to set up a separate product page for each plate type - with blue, mint, orange, blue dotted, and mint dotted kitties - so that each plate style will have its product name, SKU, price, stock level and so on. While this solution is workable, the one area where it falls short is that while a customer is on the page for one specific plate style, there is no way to know that we have similar plates with the same print in other colors and patterns. Of course, we wouldn't have this problem if we had all the colors and patterns upfront on the same page. We could add links to the other plate styles in the product description, but this would mean having to maintain five different product descriptions. Not handy, agree?
Luckily, X-Cart provides a solution that allows us to add the plates to the catalog as a single product and enable our customers to select the kitty print's color and pattern as product options. It is possible by using the attributes feature. So, we create a product, set its price at $12, and configure the attributes for this product as follows:
We have the Blue, Mint, and Orange options for the "Kitty print color" attribute and the Dotted and Plain options for the "Kitty print pattern" attribute. The dotted and plain kitty plates' price difference is achieved using the "+0.5" price modifier. On the storefront, the product appears like so:
At first glance, this approach seems better because now customers can see all the plate styles on one page, and we still have the different prices for the dotted and plain patterns ($12.50 and $12.00, respectively - precisely as we wanted). However, if we consider this setup more closely, we'll notice some significant flaws:
There is no way to stop buyers from selecting the "Orange + Dotted" combination, which we do not carry.
There is no way to track the inventory levels for the different plate styles separately. It would not be a problem if we made the plates ourselves - in this case, if we received an order for a plate style that was out of stock, we would make a new plate in the required color and pattern. But we're just a retailer, and when we get an order, we have to make do with whatever quantities of individual plate styles we have on hand.
Here X-Cart's product variants feature may come in handy. Product variants are specific variations of a product that use a common product name, description, and most of the other product properties, but each have their own SKU, stock level, and price. In our example, these would be the individual plate styles:
Blue + Plain,
Mint + Plain,
Orange + Plain,
Mint + Dotted,
Blue + Dotted,
Orange + Dotted (the unavailable combination).
Suppose we configure the above option combinations as product variants for the product. In that case, our buyers will still be able to select the kitty print color and pattern as product options. Still, this time we won't need to worry about them selecting an unavailable option combination: first, you will be able to remove the variant "Orange + Dotted" as inaccessible from the beginning; second, if any of the other variants goes out of stock, the store will automatically disable the respective option combination so that buyers will not be able to select it.
Read on: