1

I have a question. My site sells tours. For each tour(product) a user can choose a flight and some hotel rooms. Example tour1: user can choose: flight1 and flight2. user can choose: double rooms and/or single rooms.
If the user choose flight1 then -> double rooms costs 50, single rooms costs 100(a). If the user choose flight2 then -> double rooms costs 150, single rooms costs 200 (b). I have 3 dependent variation types(flight, doubleRoom, singleRoom). What I want is: if the user choose flight1 I only show double rooms = 50, single rooms =100 (rooms(a)); if the user choose flight2 I only show double rooms = 150, single rooms=200 (rooms(b)). Flights and rooms have a taxonomy terms called 'solution':solution1, solution2 ecc.. I think that a way should be use rules, with event 'After adding a product to the cart' but I can't write the condition('if flight choose solution1') and the action(set visible=true where rooms solution= solution1). Can someone help me please?? Thanks in advice

1 Answer 1

0

I am looking for this for Drupal 8, however it appears that the module Commerce Product Add-on provides a solution for Drupal 7 (I have not tested it).

Commerce Product Add-On allows users to attach products as options to the add to cart form of another product. This is particularly useful for things like event sponsorship, optional accessories, and other up-sells.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.