Here the flower is the main product(ie,simple product) and the teddy bear is its associated crossell product..if i remove the flower its associated crossell product ie, teddybear should also be removed automatically..plz someone guide me on this where to apply the logic
Here is a basic logic how it can be done-
You need to create an observer on
remove item from cart event.
then in this observer you need to get all existing cart items and associated cross-sell products of that item and them compare them.
For matched products, you need to remove them from cart too.
I hope you know already how to create observer.
Check below link for event observer on cart item remove-