You can look at bundled or grouped products. It should do the trick without writting a line of code (or almost). To check what is the best in your case, I would advise you to have a look at this answer : http://magento.stackexchange.com/a/37655/9489https://magento.stackexchange.com/a/37655/9489