From 600e38f4b08eaf5ec3056265f79843e22aa6eb83 Mon Sep 17 00:00:00 2001 From: Gustavo Luigi <=> Date: Wed, 7 Sep 2022 16:39:11 +0200 Subject: [PATCH] . --- assets/js/checkout.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/js/checkout.js b/assets/js/checkout.js index 3da5eca..249c57d 100644 --- a/assets/js/checkout.js +++ b/assets/js/checkout.js @@ -55,6 +55,7 @@ $(window).on('load', function(){ $("#successful-submitting-form").delay(4000).slideUp(200, function() { $(this).alert('close'); }); $('#anfrage').submit(function(event){ event.preventDefault(); + let form = $(this); getInfoFromSelectedProduct().done(function(response, status){ let products = response.contents.map(product => { product = getProductInfo(product); @@ -64,7 +65,7 @@ $(window).on('load', function(){ $('#ccart').val(JSON.stringify({"total-price": totalPrice, "products": products})); objProducts = []; localStorage.setItem("products", JSON.stringify(objProducts)); - $(this).unbind('submit').submit(); + form.unbind('submit').submit(); }); }); $(document).on('click', '.btn-remove-product', function(){