deleting dependent item from cart
my client would like a mechanism whereby a (child) item can only be added to the cart when a 'parent' item is already present.
i have used the ecart conditional total function to check for the presence of the parent item in the cart, which, if present, displays the add to cart button on the child item page, but if not, hides it.
No problem so far
What i now want to do is prevent a customer from removing the parent item from the cart whilst leaving the child item.
If the remove checkbox is checked on the parent item line, and the update button is clicked, i want to either...
display a message saying that the child item must be removed first
or
delete the child item as well as the parent item from the cart.