Answer the question
In order to leave comments, you need to log in
How to select options for each product in Drupal Commerce?
We have a Product Variation Type: Women's clothing
We have a glossary of terms: Women's clothing sizes
When adding a product, we choose which sizes are available, for example, 42; 44; 46
Other product may have sizes available: 44; 46; 48; 50
Before adding to the basket, you must select one of the available sizes from the drop-down list.
This does not reboot, but simply selects an option. The choice does not affect the price and the picture.
Solutions that do not fit:
1. Creating variants of goods for each size is difficult, long, not necessary, there can be 10 sizes, or even more.
2. Add the ability to select a size to the Line Item (Product Customization module) - not suitable, since every time all sizes from the dictionary will come out.
3. Creating for each product its own variation type and presentation - well, this is completely useless.
If you need to develop / refine the module, then I will consider the options.
Answer the question
In order to leave comments, you need to log in
Still, I solved the problem by installing the Commerce Bulk Create Product module. Added a field with dimensions and in the settings indicated the possibility of using it by the module. Now, when creating a product through this module, I can select the desired dimensions with the mouse. As a result of the generation, a product with the necessary variations is obtained, but at the same time, their images are the same. You can add another attribute for generation, for example, color. The advantage of this solution is that variations are created according to Drupal Commerce logic quickly and conveniently. No need to write new modules.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question