master
			
			
		
		
							parent
							
								
									f5fb93e893
								
							
						
					
					
						commit
						7db0780544
					
				| 
						 | 
				
			
			@ -44,23 +44,10 @@
 | 
			
		|||
                    <a href="{{url('/kontakt')}}" class="text-decoration-none mt-2 fw-bold">Kontakt</a>
 | 
			
		||||
                </div>
 | 
			
		||||
                <div class="col-1 text-end">
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    <a href=""  data-bs-toggle="modal" data-bs-target="#ShoppingCart" class="position-relative">
 | 
			
		||||
                        <svg style="fill: white; width: 30px; margin-top: 6px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M352 128C352 57.42 294.579 0 224 0 153.42 0 96 57.42 96 128H0v304c0 44.183 35.817 80 80 80h288c44.183 0 80-35.817 80-80V128h-96zM224 48c44.112 0 80 35.888 80 80H144c0-44.112 35.888-80 80-80zm176 384c0 17.645-14.355 32-32 32H80c-17.645 0-32-14.355-32-32V176h48v40c0 13.255 10.745 24 24 24s24-10.745 24-24v-40h160v40c0 13.255 10.745 24 24 24s24-10.745 24-24v-40h48v256z"/></svg>
 | 
			
		||||
 | 
			
		||||
                        @if(3==3)
 | 
			
		||||
                            <span class="position-absolute top-0 start-90 translate-middle badge rounded-pill bg-danger">
 | 
			
		||||
                            3<span class="visually-hidden">Produkte im Warenkorb</span>
 | 
			
		||||
                        </span>
 | 
			
		||||
                        @endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                        <span class="position-absolute top-0 start-90 translate-middle badge rounded-pill bg-danger" id="count-products-in-bag">0</span>
 | 
			
		||||
                    </a>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                    <!-- Modal -->
 | 
			
		||||
                    <div class="modal fade" id="ShoppingCart" tabindex="-1" aria-labelledby="ShoppingCart" aria-hidden="true">
 | 
			
		||||
                        <div class="modal-dialog modal-lg">
 | 
			
		||||
                            <div class="modal-content">
 | 
			
		||||
| 
						 | 
				
			
			@ -75,61 +62,26 @@
 | 
			
		|||
                                    <div class="row">
 | 
			
		||||
                                        <div class="col-12">
 | 
			
		||||
                                            <table class="table table-striped">
 | 
			
		||||
 | 
			
		||||
                                                <tbody id="list-products-in-bag">
 | 
			
		||||
 | 
			
		||||
                                                <!-- <tr>
 | 
			
		||||
                                                    <td class="text-start">
 | 
			
		||||
                                                        <img class="rounded img-fluid" src="https://picsum.photos/100/100">
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                                                    </td>
 | 
			
		||||
 | 
			
		||||
                                                    <td class="text-start">
 | 
			
		||||
                                                        <span class="fs-5">Longi 375 Modul</span>
 | 
			
		||||
                                                        <br>
 | 
			
		||||
                                                        <small class="text-success">sofort verfügbar</small>
 | 
			
		||||
                                                        <br>
 | 
			
		||||
 | 
			
		||||
                                                        <select class="form-select form-select-sm mt-2" style="width: 125px;" aria-label="Default select example">
 | 
			
		||||
                                                            <option selected value="1">Anzahl: 1</option>
 | 
			
		||||
                                                            <option value="2">Anzahl: 2</option>
 | 
			
		||||
                                                            <option value="3">Anzahl: 3</option>
 | 
			
		||||
                                                        </select>
 | 
			
		||||
                                                    </td>
 | 
			
		||||
 | 
			
		||||
                                                    <td class="align-middle text-end">18,00€
 | 
			
		||||
                                                        <br>
 | 
			
		||||
                                                        <a href="" class="small text-muted text-decoration-none">Löschen</a>
 | 
			
		||||
                                                    </td>
 | 
			
		||||
 | 
			
		||||
                                                </tr> -->
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
                                                </tbody>
 | 
			
		||||
                                                <tbody id="list-products-in-bag"></tbody>
 | 
			
		||||
                                                <tfoot>
 | 
			
		||||
                                                <tr>
 | 
			
		||||
                                                    <th class="text-start" scope="col">Gesammt:</th>
 | 
			
		||||
                                                    <th colspan="3" class="text-end">2838,00 €
 | 
			
		||||
                                                        <br>
 | 
			
		||||
                                                        <small class="text-end fw-light">Preise inkl. 19% Umsatzsteuer</small>
 | 
			
		||||
                                                    </th>
 | 
			
		||||
 | 
			
		||||
                                                </tr>
 | 
			
		||||
                                                    <tr>
 | 
			
		||||
                                                        <th class="text-start" scope="col">Gesammt:</th>
 | 
			
		||||
                                                        <th colspan="3" class="text-end">2838,00 €
 | 
			
		||||
                                                            <br>
 | 
			
		||||
                                                            <small class="text-end fw-light">Preise inkl. 19% Umsatzsteuer</small>
 | 
			
		||||
                                                        </th>
 | 
			
		||||
                                                    </tr>
 | 
			
		||||
                                                </tfoot>
 | 
			
		||||
 | 
			
		||||
                                            </table>
 | 
			
		||||
                                        </div>
 | 
			
		||||
                                    </div>
 | 
			
		||||
                                </div>
 | 
			
		||||
                                <div class="modal-footer">
 | 
			
		||||
 | 
			
		||||
                                    <a href="{{url('/checkout')}}" type="button" class="btn btn-primary">Angebot unverbindlich anfragen</a>
 | 
			
		||||
                                </div>
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    </div>
 | 
			
		||||
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -156,38 +108,29 @@
 | 
			
		|||
        }
 | 
			
		||||
        $(window).on('load', function(){
 | 
			
		||||
            if(localStorage.getItem("products") != null) objProducts = JSON.parse(localStorage.getItem("products"));
 | 
			
		||||
            $.ajax({
 | 
			
		||||
                headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') },
 | 
			
		||||
                url: "{{url('/contents/all')}}/"+objProducts.join(","),
 | 
			
		||||
                type: "get",
 | 
			
		||||
                cache : false,
 | 
			
		||||
                processData: false,
 | 
			
		||||
                contentType: false,
 | 
			
		||||
                success: function (response) {
 | 
			
		||||
                    response.contents.forEach(function(item){
 | 
			
		||||
                        $('#list-products-in-bag').append(`
 | 
			
		||||
                        <tr>
 | 
			
		||||
                            <td class="text-start">
 | 
			
		||||
                                <img class="rounded img-fluid" src="https://picsum.photos/120/120">
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td class="text-start">
 | 
			
		||||
                                <span class="fs-5">${item.title}</span>
 | 
			
		||||
                                <br>
 | 
			
		||||
                                <small class="text-success">sofort verfügbar</small>
 | 
			
		||||
                                <br>
 | 
			
		||||
                                <select class="form-select form-select-sm" aria-label="Default select example">
 | 
			
		||||
                                    <option selected value="1">Anzahl: 1</option>
 | 
			
		||||
                                    <option value="2">Anzahl: 2</option>
 | 
			
		||||
                                    <option value="3">Anzahl: 3</option>
 | 
			
		||||
                                </select>
 | 
			
		||||
                            </td>
 | 
			
		||||
                            <td class="align-middle text-end">18,00€</td>
 | 
			
		||||
                        </tr>`);
 | 
			
		||||
                    });
 | 
			
		||||
                },
 | 
			
		||||
                error: function(error) {
 | 
			
		||||
                    console.log(error);
 | 
			
		||||
                }
 | 
			
		||||
            $.get("{{url('/contents/all')}}/"+objProducts.join(","), function(response, status){
 | 
			
		||||
                $('#count-products-in-bag').text(response.contents.length);
 | 
			
		||||
                if(response.contents.length > 0) response.contents.forEach(function(item){
 | 
			
		||||
                    $('#list-products-in-bag').append(`
 | 
			
		||||
                    <tr>
 | 
			
		||||
                        <td class="text-start">
 | 
			
		||||
                            <img class="rounded img-fluid" src="https://picsum.photos/120/120">
 | 
			
		||||
                        </td>
 | 
			
		||||
                        <td class="text-start">
 | 
			
		||||
                            <span class="fs-5">${item.title}</span>
 | 
			
		||||
                            <br>
 | 
			
		||||
                            <small class="text-success">sofort verfügbar</small>
 | 
			
		||||
                            <br>
 | 
			
		||||
                            <select class="form-select form-select-sm" aria-label="Default select example">
 | 
			
		||||
                                <option selected value="1">Anzahl: 1</option>
 | 
			
		||||
                                <option value="2">Anzahl: 2</option>
 | 
			
		||||
                                <option value="3">Anzahl: 3</option>
 | 
			
		||||
                            </select>
 | 
			
		||||
                        </td>
 | 
			
		||||
                        <td class="align-middle text-end">18,00€</td>
 | 
			
		||||
                    </tr>`);
 | 
			
		||||
                });
 | 
			
		||||
                else $('#count-products-in-bag').hide();
 | 
			
		||||
            });
 | 
			
		||||
        });
 | 
			
		||||
    </script>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue