In the Magento 2 cart when you click on the basket you can only remove one product from the cart. What I would like to do is to be able to remove multiple items from the cart at the same time as soon as I click on a single basket.
As shown in the example below, if I have two or more items in my cart, if I click on a single basket I would like more items to be removed.
I tried to do it with jquery like this but without success:
<script>
$("#shopping-cart-table .deleteItem .action-delete").on('click',function(){
$("#shopping-cart-table .deleteItem .action-delete").each(function(i) {
var btn = $(this);
setTimeout(function() {
btn.trigger("click");
}, 100);
});
});
</script>
How could I do fro remove multiple items from cart when i click only on remove button?