How to add pop up modal confirm on click of clear shopping cart in cart page.
I tried with below code but its showing confirm pop up but its clear cart if I confirm or not.
<script type="text/javascript">
require(['jquery','Magento_Ui/js/modal/confirm'], function ($, confirm) {
$('.update').on("click",function(event){
event.stopPropagation();
getId = $(this).attr('data-order');
confirm({
content: 'Are you sure you would like to remove these item from the shopping cart?',
actions: {
confirm: function () {
return true;
},
cancel: function (event) {
return false;
}
}
});
});
function _removeItem(orderId){
return false;
},
});
</script>