Gustavo Luigi 2022-09-07 16:39:11 +02:00
parent 149c12ce71
commit 600e38f4b0
1 changed files with 2 additions and 1 deletions

View File

@ -55,6 +55,7 @@ $(window).on('load', function(){
$("#successful-submitting-form").delay(4000).slideUp(200, function() { $(this).alert('close'); }); $("#successful-submitting-form").delay(4000).slideUp(200, function() { $(this).alert('close'); });
$('#anfrage').submit(function(event){ $('#anfrage').submit(function(event){
event.preventDefault(); event.preventDefault();
let form = $(this);
getInfoFromSelectedProduct().done(function(response, status){ getInfoFromSelectedProduct().done(function(response, status){
let products = response.contents.map(product => { let products = response.contents.map(product => {
product = getProductInfo(product); product = getProductInfo(product);
@ -64,7 +65,7 @@ $(window).on('load', function(){
$('#ccart').val(JSON.stringify({"total-price": totalPrice, "products": products})); $('#ccart').val(JSON.stringify({"total-price": totalPrice, "products": products}));
objProducts = []; objProducts = [];
localStorage.setItem("products", JSON.stringify(objProducts)); localStorage.setItem("products", JSON.stringify(objProducts));
$(this).unbind('submit').submit(); form.unbind('submit').submit();
}); });
}); });
$(document).on('click', '.btn-remove-product', function(){ $(document).on('click', '.btn-remove-product', function(){