1

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.

1 Answer 1

1

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 : https://magento.stackexchange.com/a/37655/9489

1
  • Grouped products just wouldn't be a viable option for me, because there are thousands of products meaning that there will be tens of thousands of combinations (one grouped for each combination). Also, the configurable and simple still need to remain separate products within their own right.
    – Karl
    Commented Apr 28, 2015 at 14:08

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.