<button id="deletecart">EMPTY CART</button>
<script>
$('#deletecart').click(function (e) {
e.preventDefault();
$.ajax({
type: "POST",
url: '/cart/clear.js',
success: function(){
document.location.href = '/collections/all;
},
dataType: 'json'
});
});
</script>