Jump to content

How to add a product with another product


Recommended Posts

Hi,

How to add a product with another product . When a customer add a product into the cart, based on the category another product will come automatically into the cart like a dependent product and it should get deleted when main product is deleted.

Link to comment
Share on other sites

Then you need to edit the cart controller/class. It's a bit long, you want to check what product is being added, and if it matches the id, add the extra one as well. Of course, it must be deleted together too. It all depends on how you want to handle the thing at that point

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...