From b860d012750c56d778a43e5210faa4c021c8ae2e Mon Sep 17 00:00:00 2001 From: Gustavo Luigi Date: Mon, 29 Aug 2022 12:56:18 +0200 Subject: [PATCH 1/4] add local storage key 'products' --- content/contents/produkt.blade.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/content/contents/produkt.blade.php b/content/contents/produkt.blade.php index 6c15159..b2a58f1 100644 --- a/content/contents/produkt.blade.php +++ b/content/contents/produkt.blade.php @@ -190,4 +190,15 @@ +@stop +@section('scripts') + @stop \ No newline at end of file From c5ab4dc5069d4c412dc9559a9234f2e67eca0b41 Mon Sep 17 00:00:00 2001 From: Gustavo Luigi Date: Mon, 29 Aug 2022 13:02:15 +0200 Subject: [PATCH 2/4] . --- content/contents/produkt.blade.php | 6 ++++++ 1 file changed, 6 insertions(+) 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")); }); */ From 7efb2803d605f7c0655d729cc6a948241c6dad52 Mon Sep 17 00:00:00 2001 From: Gustavo Luigi Date: Mon, 29 Aug 2022 13:23:47 +0200 Subject: [PATCH 3/4] . --- config.json | 41 ++++++++++++++++++++++++------ content/contents/produkt.blade.php | 2 +- 2 files changed, 34 insertions(+), 9 deletions(-) diff --git a/config.json b/config.json index 241f383..b3ea64e 100644 --- a/config.json +++ b/config.json @@ -15,13 +15,38 @@ "icon":"shopping-bag", "status":1, "blade":"produkt", - "fields":[{ - "name":"Preis", - "type":"number", - "description":"", - "position":1, - "required":1, - "default_value":"" - },{"name":"Lieferumfang","type":"textfield","description":"","position":2,"required":1,"default_value":""}]} + "fields":[ + { + "name":"Preis", + "type":"number", + "description":"", + "position":1, + "required":1, + "default_value":"" + }, + { + "name":"Lieferumfang", + "type":"textfield", + "description":"", + "position":2, + "required":1, + "default_value":"" + } + ] + } + ], + "lists": [ + { + "name": "Produkte", + "slug": "produkte", + "description": "", + "search_terms": "", + "image": "", + "seo_title": "", + "seo_description": "", + "blade": "produkte", + "content-types": ["Produkt"], + "sorting": "Created At (DESC)" + } ] } diff --git a/content/contents/produkt.blade.php b/content/contents/produkt.blade.php index ad30805..1a7566c 100644 --- a/content/contents/produkt.blade.php +++ b/content/contents/produkt.blade.php @@ -124,7 +124,7 @@
- +