diff --git a/content/contents/produkt.blade.php b/content/contents/produkt.blade.php index b2a58f1..ad30805 100644 --- a/content/contents/produkt.blade.php +++ b/content/contents/produkt.blade.php @@ -198,6 +198,12 @@ localStorage.setItem("products", JSON.stringify(objProducts)); } $(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")); }); */