Vote up!
Vote down!

How do I build a "sample pack" based on my other products?

I'm building a site in Drupal Commerce and have several products. For example, classic popcorn, cheddar popcorn, chocolate peanut butter popcorn, etc. They are each a "Product" content type and have several sizes (using Inline Entity Form), like 1 gallon tin, 2, 3, 6.5, etc. They are all priced, etc. so that users can select their size and add it to the cart. Works great.

Now what we want to do is build a popcorn sampler. So, for our 2, 3, and 6.5 gallon tins, we want people to be able to select any of our popcorn varieties and charge them accordingly.

So, they can choose classic for flavor 1, cheddar for flavor 2 (+$1.00), and chocolate peanut butter for flavor 3 (+$3.00).

Ideally, when we add a new product/flavor (e.g. let's say we introduce cinnamon popcorn, add the product and sizes, etc.), it would add that option to the flavors for the sampler.

I can't quite seem how to wrap my mind around creating this. I wouldn't even mind going into the sampler to edit and add the new flavors. I can't even find a way to add the three flavor options. Any help is appreciated!

Asked by: MrPeanut
on October 13, 2012


The other option is to have one field with all the flavors and force them to choose 3 flavors and then use Rules (?) to price them. Not sure if that's an option, but it would work for my purpose.

- MrPeanut on October 13, 2012

1 Answer

Vote up!
Vote down!

The way commerce is currently setup, bundling like this isn't a cake-walk. You could use the taxonomy term price field method described in this video but it's not the best fit. Commerce 1.x's solution is to create a unique SKU for every possibility and the reverse engineer that to show "configurable" drop downs where "multiple options" are available. That may be limiting because you may have 3 flavors, 3 sizes, and 16 tins. That means a lot of possibilities!

Some modules trying to solve this problem for 1.x


Also, note that Commerce 2.x slated for Drupal 8 will be trying to make solving the bundling problem easier.

Josh Miller
Answer by: Josh Miller
Posted: Jan 9, 2013