I'm creating a webshop with Drupal Commerce. I have a product variation (T-shirt) with three product attributes: color, size, and print.

If I need a t-shirt with 5 different colors, 5 different sizes, and 5 different prints, I would need to manually create 125 product variations from the user interface.

Is it possible to automatically create those product variations?

It should be possible to enter the default price for all the variations.

I found Product variant bulk creation, where it is said that functionality has been made in the Commerce Bulk module. I installed that module, but I could not find any option to bulk generate the product variations.


1 Answer 1


I could not install the Commerce Bulk module. Then I saw Product variant bulk creation, which will be a sweet feature when it has been merged. I could not get the patch to apply so I ended up creating a sandbox module based on this.

Judging by your rank, you will know how to get the code.

This module will give you a route (no link yet). You need to create at least one Product variation manually, then go to /product/PRODUCTID/variations/VARIATIONID/bulk-generate (for example /product/331/variations/1/bulk-generate) to bulk generate your variations.



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.