{% if request.show_custom_form_values %}
@@ -187,4 +189,18 @@
});
});
+
+ $('.remove-cart-item').click(function(e){
+ e.preventDefault();
+ var btn = $(this);
+ if (confirm('{% trans 'Are you sure you want to remove this item from cart?' %}')){
+ var item_id = $(btn).attr('data-cart-item-id');
+ bb.post("guest/cart/remove_item", {id: item_id}, function(r){
+ bb.msg("{% trans 'Item was removed from cart' %}");
+ location.reload(false);
+ });
+ }
+
+
+ });
\ No newline at end of file