diff --git a/content/pages/checkout.blade.php b/content/pages/checkout.blade.php
index 197a659..f3c8751 100644
--- a/content/pages/checkout.blade.php
+++ b/content/pages/checkout.blade.php
@@ -5,6 +5,20 @@
@stop
@section('content')
+
+
+
+
+
+
+
+
+
+ Es befinden sich keine Produkte im Warenkorb
+
+
+
+
@if(session()->has('success'))
{{session()->get('success')}}
@@ -115,7 +129,8 @@
Gesammt: |
- 2838,00 €
+ |
+ 0 €
Preise inkl. 19% Umsatzsteuer
|
@@ -208,9 +223,7 @@
});
});
}
-
$(window).on('load', google.maps.event, initialize);
-
let input = document.querySelector("#ctelefon");
let iti = window.intlTelInput(input, {
initialCountry: "de", geoIpLookup: function(callback) {
@@ -222,6 +235,47 @@
utilsScript: "{{storage('assets/libs/intl-tel-input/js/utils.min.js')}}",
});
$(window).on('load', function(){
+
+ if(objProducts.length > 0) {
+ let ids = objProducts.map(obj => obj.id);
+ $.get($('meta[name="get-contents"]').attr('content')+"/"+ids.join(","), function(response, status){
+ response.contents.forEach(function(item){
+ let objProductInfo = objProducts.find(obj => obj.id == item.id);
+ let elementProduct = `
+
+
+
+ |
+
+ ${item.title}
+
+ sofort verfügbar
+
+
+
+ |
+ ${formatter.format(item.data_fields.preis)} |
+
`;
+ $('#list-products-in-bag').append(elementProduct);
+ });
+ $('#total-price').text(formatter.format(totalPrice));
+ });
+ $('#list-products').parent().parent().parent().parent().parent().find('.modal-footer').show();
+ $('#total-checkout-price').parent().parent().parent().show();
+ $('#no-products-in-checkout').hide();
+ }else {
+ $('#list-products').parent().parent().parent().parent().parent().find('.modal-footer').hide();
+ $('#total-checkout-price').parent().parent().parent().hide();
+ $('#no-products-in-checkout').show();
+ }
+
$('#anfrage').submit(function(){
objProducts = [];
updateProductsInLocalStorage();