Gustavo Luigi 2022-08-29 13:02:15 +02:00
parent b860d01275
commit c5ab4dc506
1 changed files with 6 additions and 0 deletions

View File

@ -198,6 +198,12 @@
localStorage.setItem("products", JSON.stringify(objProducts)); localStorage.setItem("products", JSON.stringify(objProducts));
} }
$(window).load(function(){ $(window).load(function(){
let product = {};
product["id"] = database.attr("data-id");
product["name"] = database.attr("data-name");
objProducts.push(product);
objProducts.splice(index, 1);
updateProductsInLocalStorage();
if(localStorage.getItem("products") != null) objProducts = JSON.parse(localStorage.getItem("products")); if(localStorage.getItem("products") != null) objProducts = JSON.parse(localStorage.getItem("products"));
}); */ }); */
</script> </script>