How can I link products together?
Here's an example scenario.
Customer wants to buy carpet, which they can then choose to add underlay to. A Carpet is a configurable product, and Underlay is a Simple product
I have created an observer which listens to checkout_cart_add_product_complete, when this event is triggered, I check if they've selected to add underlay, if so, I programmatically add the product to the cart.
This all works fine, but the issue I'm having is when they view the shopping cart, there are two products in there. If the customer then adds a different Carpet with the same underlay, then there will be 3 products as the quantity will just be increased for the underlay.
Is there a way to link the products together at the point that they're added to the cart. So Carpet 1 and Underlay 1, is one product and Carpet 2 and Underlay 1 is another?
Hopefully this all makes sense.
Thanks in advance.