master
parent
eeb8ad675b
commit
149c12ce71
|
@ -53,7 +53,8 @@ function updateProducts(){
|
||||||
$(window).on('load', function(){
|
$(window).on('load', function(){
|
||||||
updateProducts();
|
updateProducts();
|
||||||
$("#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(){
|
$('#anfrage').submit(function(event){
|
||||||
|
event.preventDefault();
|
||||||
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);
|
||||||
|
@ -63,6 +64,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();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
$(document).on('click', '.btn-remove-product', function(){
|
$(document).on('click', '.btn-remove-product', function(){
|
||||||
|
|
Loading…
Reference in New Issue