I am building a Drupal Commerce based site and now I am facing the following issue.
I have created some T-Shirt Products like,
- T-Shirt (White)
- T-Shirt (Black)
- T-Shirt (Blue)
And also created a product display called "Shirts". In that product display I created a new node "T-Shirt". Since The "size" is an attribute to the product type so I am having a select box to select the color while viewing the "T-Shirt" content.
But the problem comes here. As per my need, if the user selects "Color - White" while viewing the product display, we need to add another product "Blue-Jeans" to it. So that means, White Shirt and Blue Jeans will go together in cart if selected.
I am using inline_entity_form to reference products in a Product display (Same as Commerce Kickstart Demo "Tops" product display). How can I achieve this functionality?