Automatically create variations?

I'm attempting to set up Commerce Kickstart 2 and I've got a question about the way variations are set up. I've been trying to figure out how my products line up with CK2's products, product types and variations.

The site I'm building has several different product types. The main type is a laptop case that comes in one of 5 sizes. Some laptop cases come in 7 different colors, but some only come in 2, some in more.

Am I going to need a different product type for each kind of laptop case? So instead of having one product type that covers all laptop cases, it would be Fabric Laptop Cases, Leather Laptop Cases, Vinyl Laptop Cases instead of just one called Laptop Case.

Also, does this really mean I need a different SKU for every possible combination? For example, with Fabric Laptop Cases, there would be 7 different colors x 5 different sizes. So there'd be 35 different variations, all with the same price? What if I had another metric, such as "With or without strap". That would make it 70? Is there a way to automatically generate those?

Ideally, along with the 5 set laptop sizes available, there would be a 6th one that listed as "Custom". Which would allow the customer to input their Length, Width, and Depth of their laptop. Possible?

Posted: Jan 29, 2013


wispaway on April 28, 2013

I feel your pain on this very important point. I'm looking at an average of 30 variants per product in my own project, with several at the 120 mark.

Good news though, you do not have to create different product types for your scenario.


1) Create your variant categories(taxonomy); Size, Material, Color; and add the pertinent values to each. You can even add fields as needed(i.e. images). I created another category just for base SKUs to use with AutoSKU.

2) Create your Product Variation Type and add the category fields as "term reference" "selection lists" being sure to mark them with "Enable this field to function as an attribute field on Add to Cart forms."

Now you can create your products with selected variants.

You will still have to do this manually for ALL the variants. BPC just does not work correctly or in a desired fashion on CK2 and I have yet to find an alternative.

Developer silence on this issue is deafening.

Good Luck!!!

docans on February 7, 2014

Have you found a way to automatically or dynamically create a product variations. I am migrating to drupal commerce from ubercart because of this issue. Any progress so far