Answer the question
In order to leave comments, you need to log in
Removing Bitrix from the cart?
Guys. I have a product and it has additional products that are set up as a multiple list.
When I add these items to cart. One product is the main one and with it 2 more additional products, everything is fine.
And now, suppose I want to remove the main product from the cart, and accordingly, so that the additional products would also be removed. But only the main product is removed from me, and the additional ones remain in the basket.
How can I do this so that I can delete additional products along with the main one?
Answer the question
In order to leave comments, you need to log in
Hang a handler on the OnBasketDelete event and check if a product has been deleted for which the "Additional equipment" property is not empty, then delete from the basket (or reduce by 1 item) products with IDs equal to the values from this property.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question