Compare commits
16 Commits
Author | SHA1 | Date |
---|---|---|
Robin Schumann | f1df6268b3 | |
Eline Steinbrecher | 085e83129d | |
Robin Schumann | 3d30ddcd4f | |
Robin Schumann | 1e89b8cf5c | |
Robin Schumann | ef2cae3dfe | |
spagb0l | 5bc9bf7767 | |
spagb0l | e020831e4e | |
Robin Schumann | 849b62274e | |
Robin Schumann | e39ddb726f | |
Kai Sellmann | 72127f9d4c | |
Kai Sellmann | 855ac0f213 | |
Robin Schumann | abd1e70daf | |
Robin Schumann | 50ed4b290a | |
Robin Schumann | b054b6c5a4 | |
Kai Sellmann | 3dc2e7d654 | |
Kai Sellmann | 6e208b5029 |
|
@ -6,8 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Bestellungen</title>
|
||||
<style>
|
||||
@import 'css/mobile.css' (max-width: 480px);
|
||||
@import 'css/desktop.css' (min-width: 481px);
|
||||
@import 'css/mobile.css' (max-width: 800px);
|
||||
@import 'css/desktop.css' (min-width: 801px);
|
||||
</style>
|
||||
<script src="javascript/formchecker.js" async="true" ></script>
|
||||
</head>
|
||||
|
@ -124,13 +124,13 @@
|
|||
<p id="gesamtkosten"><strong>Die Gesamtkosten (inkl. MwSt.)</br>belaufen sich auf: 5,30€</strong>
|
||||
|
||||
<p>
|
||||
<input type="checkbox" class="checkbox_ausrichtung">
|
||||
<input id="barzahlung_box" type="checkbox" class="checkbox_ausrichtung">
|
||||
<label for="checkbox_barzahlung" class="checkboxen">Ich akzeptiere die Barzahlung und habe
|
||||
den</br>Rechnungsbetrag bei
|
||||
Lieferung verfügbar.</label>
|
||||
</p>
|
||||
<p>
|
||||
<input type="checkbox" class="checkbox_ausrichtung">
|
||||
<input id="datenschutz_box" type="checkbox" class="checkbox_ausrichtung">
|
||||
<label for="checkbox_datenschutzerklärung" class="checkboxen">Ich akzeptiere die Bestimmungen der</label>
|
||||
<a href="datenschutz.html" class="checkboxen">Datenschutzerklärung.</a>
|
||||
</p>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Bestellung erfolgreich</title>
|
||||
<style>
|
||||
@import 'css/mobile.css' (max-width: 480px);
|
||||
@import 'css/desktop.css' (min-width: 481px);
|
||||
@import 'css/mobile.css' (max-width: 800px);
|
||||
@import 'css/desktop.css' (min-width: 801px);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Bestellung fehlgeschlagen</title>
|
||||
<style>
|
||||
@import 'css/mobile.css' (max-width: 480px);
|
||||
@import 'css/desktop.css' (min-width: 481px);
|
||||
@import 'css/mobile.css' (max-width: 800px);
|
||||
@import 'css/desktop.css' (min-width: 801px);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
|
|
@ -146,6 +146,11 @@
|
|||
font-size: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content h3{
|
||||
color: black;
|
||||
margin-bottom: 0.2em;
|
||||
}
|
||||
|
||||
.content a {
|
||||
margin-left: 0em;
|
||||
|
@ -511,3 +516,13 @@
|
|||
cursor: pointer;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
#fehlerbox{
|
||||
text-align: center;
|
||||
color: red;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mobile_ansicht{
|
||||
display:none;
|
||||
}
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
.navbar-mobile {
|
||||
display:grid;
|
||||
grid-template-columns: 60px auto auto;
|
||||
grid-template-rows: 60px;
|
||||
grid-template-rows: 65px;
|
||||
|
||||
}
|
||||
.navbar-mobile .nav-container a {
|
||||
|
@ -151,7 +151,7 @@
|
|||
margin-top: 60px;
|
||||
padding-top: 15px;
|
||||
background-color: #476B1C;
|
||||
height: 30vh;
|
||||
height: 400%;
|
||||
width: 400%;
|
||||
transform: translate(-150%);
|
||||
display: flex;
|
||||
|
@ -160,6 +160,8 @@
|
|||
padding-left: 50px;
|
||||
transition: transform 0.5s ease-in-out;
|
||||
text-align: left;
|
||||
position: relative;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.nav-container input[type="checkbox"]:checked ~ .menu-items {
|
||||
|
@ -207,7 +209,7 @@
|
|||
margin-left: 2%;
|
||||
font-size:1.0em;
|
||||
margin-top:0.5em;
|
||||
|
||||
|
||||
}
|
||||
|
||||
.header-mobile-text p {
|
||||
|
@ -233,7 +235,7 @@
|
|||
}
|
||||
|
||||
.content :not(h1, strong, a) {
|
||||
margin-left: 3.5em;
|
||||
margin-left: 0em;
|
||||
color: #606060;
|
||||
}
|
||||
|
||||
|
@ -248,6 +250,11 @@
|
|||
font-size: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.content h3{
|
||||
color: black;
|
||||
margin-bottom: 0.2em;
|
||||
}
|
||||
|
||||
.content a {
|
||||
margin-left: 0em;
|
||||
|
@ -300,7 +307,7 @@
|
|||
#wohnort,
|
||||
#email {
|
||||
border: none;
|
||||
width: 600px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.bestellung_tabelle {
|
||||
|
@ -312,6 +319,7 @@
|
|||
margin-left: 50px;
|
||||
border: thin solid #606060;
|
||||
border-collapse: collapse;
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
.bestellung_tabelle th {
|
||||
|
@ -320,7 +328,7 @@
|
|||
|
||||
.bestellung_tabelle td {
|
||||
border: thin solid #606060;
|
||||
width: 600px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.bestellung_tabelle tr {
|
||||
|
@ -414,41 +422,65 @@
|
|||
position: relative;
|
||||
}
|
||||
|
||||
.produkte_warenkorb {
|
||||
.content .produkte_warenkorb {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
grid-template-rows: auto 1fr;
|
||||
border: thin solid black;
|
||||
margin-left: 4em;
|
||||
margin-top: 20px;
|
||||
align-items: center;
|
||||
justify-items: left;
|
||||
position: relative;
|
||||
max-width: 88%;
|
||||
height: 165px;
|
||||
border: thin solid #606060;
|
||||
margin-top: 22.5px;
|
||||
margin-bottom: 22.5px;
|
||||
display: flex;
|
||||
|
||||
}
|
||||
|
||||
.content .produkte_warenkorb .bild_mobil img {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.produkte_warenkorb img {
|
||||
margin-right: 0px;
|
||||
height: 60%;
|
||||
|
||||
}
|
||||
|
||||
.content .produkte_details {
|
||||
color: black;
|
||||
font-weight: bold;
|
||||
width: 150px;
|
||||
display: block;
|
||||
.content .produkte_details {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 0.8em;
|
||||
margin-top: -40px;
|
||||
margin-top: -25px;
|
||||
justify-content: space-between;
|
||||
width: 95%;
|
||||
}
|
||||
|
||||
.content .produkte_details p {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.content .produkte_warenkorb .produkte_details .eingabefeld_entfernen {
|
||||
align-self: flex-end;
|
||||
margin-top: -30px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
.button_mit_menue {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: absolute;
|
||||
bottom: 50px;
|
||||
right: 30px;
|
||||
|
||||
}
|
||||
|
||||
.button_mit_menue p{
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#menue1,
|
||||
#menue2,
|
||||
#menue3,
|
||||
#menue4,
|
||||
#menue5,
|
||||
#menue6 {
|
||||
width: 35px;
|
||||
height: 25px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.button_entfernen {
|
||||
background-color: #ebebeb;
|
||||
border: thin solid black;
|
||||
|
@ -464,33 +496,21 @@
|
|||
margin: 4px 2px;
|
||||
cursor: pointer;
|
||||
font-weight: normal;
|
||||
|
||||
}
|
||||
|
||||
#menue {
|
||||
width: 35px;
|
||||
height: 25px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
.content .gesamtbetrag {
|
||||
.content .gesamtbetrag1,
|
||||
.content .gesamtbetrag2,
|
||||
.content .gesamtbetrag3,
|
||||
.content .gesamtbetrag4,
|
||||
.content .gesamtbetrag5,
|
||||
.content .gesamtbetrag6 {
|
||||
font-weight: bold;
|
||||
color: black;
|
||||
position: absolute;
|
||||
font-size: 1em;
|
||||
bottom: 15px;
|
||||
right: 15px;
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.gesamtbetrag {
|
||||
position: absolute;
|
||||
font-size: 1em;
|
||||
bottom: 15px;
|
||||
right: 15px;
|
||||
}
|
||||
|
||||
.button_hinzufuegen {
|
||||
background-color: #9BB558;
|
||||
color: white;
|
||||
|
@ -533,8 +553,8 @@
|
|||
position: relative;
|
||||
bottom: 0;
|
||||
width: 400px;
|
||||
padding-left: 50px;
|
||||
margin-top: 22.5px;
|
||||
padding-left: 30px;
|
||||
margin-top: 120px;
|
||||
margin-left: auto;
|
||||
margin-bottom: 22.5px;
|
||||
display: grid;
|
||||
|
@ -564,19 +584,22 @@
|
|||
color: black;
|
||||
display: inline-block;
|
||||
}
|
||||
.content .gesamtkosten_text{
|
||||
|
||||
.content .gesamtkosten_text {
|
||||
color: black;
|
||||
display: inline-block;
|
||||
text-align: left;
|
||||
margin-left: 0;
|
||||
margin-right: 63px;
|
||||
}
|
||||
.content .gesamtpreis{
|
||||
|
||||
.content .gesamtpreis {
|
||||
color: black;
|
||||
display: inline-block;
|
||||
margin-left: 0;
|
||||
|
||||
}
|
||||
|
||||
.content .button_bestellung_abschließen {
|
||||
background-color: #476B1C;
|
||||
color: white;
|
||||
|
@ -591,4 +614,19 @@
|
|||
font-weight: normal;
|
||||
}
|
||||
|
||||
|
||||
.content .mobile_ansicht{
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
margin-left: -55px;
|
||||
}
|
||||
|
||||
|
||||
#fehlerbox{
|
||||
text-align: center;
|
||||
color: red;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.desktop_ansicht{
|
||||
display: none;
|
||||
}
|
|
@ -6,8 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Datenschutzerklärung</title>
|
||||
<style>
|
||||
@import 'css/mobile.css' (max-width: 480px);
|
||||
@import 'css/desktop.css' (min-width: 481px);
|
||||
@import 'css/mobile.css' (max-width: 800px);
|
||||
@import 'css/desktop.css' (min-width: 801px);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
@ -80,13 +80,13 @@
|
|||
</p>
|
||||
<p>Stand: 6. April 2023</p>
|
||||
<h3>Verantwortlicher</h3>
|
||||
<ul>
|
||||
WEB A4 -Team</br>
|
||||
<p>
|
||||
WEB A4 -Team</br>
|
||||
Paul-Wittsack-Straße 10</br>
|
||||
68163 Mannheim</br>
|
||||
E-Mail-Adresse:</br>
|
||||
info@secondharvest.com</br>
|
||||
</ul>
|
||||
</p>
|
||||
<h3>Übersicht der Verarbeitungen</h3>
|
||||
<p>Die nachfolgende Übersicht fasst die Arten der verarbeiteten Daten und die
|
||||
Zwecke ihrer Verarbeitung zusammen und verweist auf die betroffenen Personen.
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Impressum</title>
|
||||
<style>
|
||||
@import 'css/mobile.css' (max-width: 480px);
|
||||
@import 'css/desktop.css' (min-width: 481px);
|
||||
@import 'css/mobile.css' (max-width: 800px);
|
||||
@import 'css/desktop.css' (min-width: 801px);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Second Harvest</title>
|
||||
<style>
|
||||
@import 'css/mobile.css' (max-width: 480px);
|
||||
@import 'css/desktop.css' (min-width: 481px);
|
||||
@import 'css/mobile.css' (max-width: 800px);
|
||||
@import 'css/desktop.css' (min-width: 801px);
|
||||
</style>
|
||||
</head>
|
||||
<body class="index">
|
||||
|
@ -72,15 +72,15 @@
|
|||
|
||||
<table>
|
||||
<tr>
|
||||
<td><img src="pictures/foodampel_rot.png"></td>
|
||||
<td><img src="pictures/food_ampel_rot.png"></td>
|
||||
<td>muss sofort verarbeitet werden</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="pictures/foodampel_gelb.png"></td>
|
||||
<td><img src="pictures/food_ampel_gelb.png"></td>
|
||||
<td>kann ein paar Tage liegen</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><img src="pictures/foodampel_gruen.png"></td>
|
||||
<td><img src="pictures/food_ampel_gruen.png"></td>
|
||||
<td>lange Haltbarkeit</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
@ -4,6 +4,7 @@ let y = document.getElementById("gesamtkosten");
|
|||
y.innerHTML = "Die Gesamtkosten (inkl. MwSt.) belaufen sich auf: " + x + "€";
|
||||
|
||||
function checkform(event) {
|
||||
let anrede = document.getElementById('anrede').value;
|
||||
let vorname = document.getElementById('vorname').value;
|
||||
let name = document.getElementById('name').value;
|
||||
let straße = document.getElementById('straße').value;
|
||||
|
@ -14,21 +15,28 @@ function checkform(event) {
|
|||
|
||||
fehlerbox.innerHTML = 'Fehler: <br>';
|
||||
|
||||
if (/[a-zA-Z]{2,}/.test(vorname) === false) fehlerbox.innerHTML += 'Vorname: mindestens zwei Buchstaben <br>';
|
||||
if (/[a-zA-Z]{2,}/.test(name) === false) fehlerbox.innerHTML += 'Name: mindestens zwei Buchstaben <br>';
|
||||
if (/[a-zA-Z0-9]{2,}/.test(straße) === false) fehlerbox.innerHTML += 'Straße: mindestens zwei Zeichen <br>';
|
||||
if (/[0-9]{1,}/.test(hausnummer) === false) fehlerbox.innerHTML += 'Hausnummer: mindestens eine Zahl <br>';
|
||||
if (/[0-9]{4,5}/.test(plz) === false) fehlerbox.innerHTML += 'Postleitzahl: mindestens vier Zahlen <br>';
|
||||
if (/[a-zA-Z]{2,}/.test(wohnort) === false) fehlerbox.innerHTML += 'Wohnort: mindestens zwei Buchstaben <br>';
|
||||
if (/^([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])+@[a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])+\.[a-z]{2,4}){0,}$/.test(email) === false) fehlerbox.innerHTML += 'EMail: bitte nach dem Muster "email@beispiel.de" <br>';
|
||||
if(!anrede || /^[A-Z][a-z]{1,}$/.test(anrede) === false) fehlerbox.innerHTML += 'Bitte teilen Sie uns Ihre Anrede mit <br>';
|
||||
if(!vorname || /^[A-ZÄÜÖ][a-zäüöß]{1,}(?:-[A-ZÄÜÖ][a-zäüöß]+)?$/.test(vorname) === false) fehlerbox.innerHTML += 'Vorname: mindestens zwei Buchstaben <br>';
|
||||
if(!name || /^[A-ZÄÜÖ][a-zäüöß]{1,}(?:-[A-ZÄÜÖ][a-zäüöß]+)?(?:\s[a-zA-ZÄÜÖäüöß]+)?$/.test(name) === false) fehlerbox.innerHTML += 'Name: mindestens zwei Buchstaben <br>';
|
||||
if(!straße || /^[A-ZÄÖÜ][a-zäöüß]+(?:-[A-ZÄÖÜ][a-zäöüß]+)*$/.test(straße) === false) fehlerbox.innerHTML += 'Straße: mindestens zwei Zeichen <br>';
|
||||
if(!hausnummer || /[0-9]{1,}/.test(hausnummer) === false) fehlerbox.innerHTML += 'Hausnummer: mindestens eine Zahl <br>';
|
||||
if(!plz || Number(plz) < 01001 || /^[0-9]{5}$/.test(plz) === false) fehlerbox.innerHTML += 'Postleitzahl: gültige Postleitzahl fünf Zahlen bspw. 66265 <br>';
|
||||
if(!wohnort || /^[A-Z][a-z]*(?:[- ][A-Z][a-z]*)*$/.test(wohnort) === false) fehlerbox.innerHTML += 'Wohnort: mindestens zwei Buchstaben <br>';
|
||||
if(!email || /^([a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])+@[a-zA-Z0-9]+([-_\.]?[a-zA-Z0-9])+\.[a-z]{2,4}){0,}$/.test(email) === false) fehlerbox.innerHTML += 'EMail: bitte nach dem Muster "email@beispiel.de" <br>';
|
||||
|
||||
if(barzahlbox.checked === false) fehlerbox.innerHTML += 'Bitte akzeptieren Sie die Barzahlung <br>';
|
||||
if(datenschutzbox.checked === false) fehlerbox.innerHTML += 'Bitte akzeptieren Sie die Datenschutzerklärung <br>';
|
||||
|
||||
if(fehlerbox.innerHTML.length > 12) {
|
||||
event.preventDefault();
|
||||
let fehlerboxstyle = document.getElementById('fehlerbox');
|
||||
fehlerbox.style = 'display: block;'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
const fehlerbox = document.getElementById('fehlerbox');
|
||||
const fehlerbox = document.getElementById('fehlerbox');
|
||||
const bestellbutton = document.getElementById('bestellbutton');
|
||||
const barzahlbox = document.getElementById('barzahlung_box');
|
||||
const datenschutzbox = document.getElementById('datenschutz_box');
|
||||
|
||||
bestellbutton.addEventListener('click', checkform, false);
|
|
@ -1,52 +1,175 @@
|
|||
let standardWerte = [10, 10, 10];
|
||||
const preise = [0.95, 2.0, 1.10];
|
||||
window.addEventListener('DOMContentLoaded', function () {
|
||||
let standardWerte = [10, 10, 10];
|
||||
const preise = [0.95, 2.0, 1.10];
|
||||
|
||||
window.addEventListener('DOMContentLoaded', berechnePreise);
|
||||
|
||||
function entferneAusWarenkorb(index) {
|
||||
let inputId = 'menue' + index;
|
||||
let inputElement = document.getElementById(inputId);
|
||||
let testVar = inputElement.value;
|
||||
|
||||
if (/^[0-9]+$/.test(testVar) === false) {
|
||||
zeigeHinweisfenster("Keine gültige Zahl eingegeben.");
|
||||
} else {
|
||||
let verringereUm = parseInt(inputElement.value);
|
||||
|
||||
if ((standardWerte[index - 1] - verringereUm) < 0) {
|
||||
zeigeHinweisfenster("Der Wert darf nicht negativ sein/die Anzahl darf nicht unter 0 fallen.");
|
||||
} else {
|
||||
zeigeHinweisfenster("");
|
||||
let aktuellerWert = standardWerte[index - 1] - verringereUm;
|
||||
standardWerte[index - 1] = aktuellerWert;
|
||||
inputElement.value = aktuellerWert;
|
||||
}
|
||||
}
|
||||
berechnePreise();
|
||||
|
||||
}
|
||||
function berechnePreise() {
|
||||
for (let i = 0; i < standardWerte.length; i++) {
|
||||
let preisID = 'gesamtbetrag' + (i + 1);
|
||||
let preisElement = document.getElementById(preisID);
|
||||
let preisEinzeln = (standardWerte[i] * preise[i]).toFixed(2);
|
||||
preisElement.innerText = "Betrag Gesamt (inkl. MwSt.): " + preisEinzeln + '€';
|
||||
document.getElementById("button1").addEventListener('click', function () {
|
||||
entferneAusWarenkorb(1);
|
||||
});
|
||||
|
||||
document.getElementById("button2").addEventListener('click', function () {
|
||||
entferneAusWarenkorb(2);
|
||||
});
|
||||
|
||||
document.getElementById("button3").addEventListener('click', function () {
|
||||
entferneAusWarenkorb(3);
|
||||
});
|
||||
|
||||
document.getElementById("button4").addEventListener('click', function () {
|
||||
entferneAusWarenkorb(4);
|
||||
});
|
||||
|
||||
document.getElementById("button5").addEventListener('click', function () {
|
||||
entferneAusWarenkorb(5);
|
||||
});
|
||||
|
||||
document.getElementById("button6").addEventListener('click', function () {
|
||||
entferneAusWarenkorb(6);
|
||||
});
|
||||
|
||||
var bestellbutton1 = document.getElementById("bestellbutton_desktop").addEventListener('click', checkObFeldLeer);
|
||||
var bestellbutton2 = document.getElementById("bestellbutton_mobil").addEventListener('click', checkObFeldLeer);
|
||||
|
||||
function entferneAusWarenkorb(index) {
|
||||
let inputId = 'menue' + index;
|
||||
let inputElement = document.getElementById(inputId);
|
||||
let testVar = inputElement.value;
|
||||
|
||||
if (/^[0-9]+$/.test(testVar) === false) {
|
||||
zeigeHinweisfenster("Keine gültige Zahl eingegeben.");
|
||||
} else {
|
||||
let verringereUm = parseInt(inputElement.value);
|
||||
|
||||
if (index === 4) {
|
||||
index = 1;
|
||||
}
|
||||
if (index === 5) {
|
||||
index = 2;
|
||||
}
|
||||
if (index === 6) {
|
||||
index = 3;
|
||||
}
|
||||
if ((standardWerte[index - 1] - verringereUm) < 0) {
|
||||
zeigeHinweisfenster("Der Wert darf nicht negativ sein/die Anzahl darf nicht unter 0 fallen.");
|
||||
} else {
|
||||
zeigeHinweisfenster("");
|
||||
let aktuellerWert = standardWerte[index - 1] - verringereUm;
|
||||
standardWerte[index - 1] = aktuellerWert;
|
||||
inputElement.value = aktuellerWert;
|
||||
}
|
||||
}
|
||||
berechnePreise();
|
||||
|
||||
}
|
||||
gesamtpreis = ((standardWerte[0] * preise[0]) + (standardWerte[1] * preise[1]) + (standardWerte[2] * preise[2])) + 2.90;
|
||||
let gesamtkostenText = document.getElementById("gesamtpreis");
|
||||
gesamtkostenText.innerText = gesamtpreis.toFixed(2) + "€";
|
||||
localStorage.setItem("gesamtpreis", gesamtpreis);
|
||||
}
|
||||
|
||||
function zeigeHinweisfenster(text) {
|
||||
var hinweisfenster = document.getElementById("notification");
|
||||
hinweisfenster.innerText = text;
|
||||
if (text !== "") {
|
||||
hinweisfenster.style.display = "block";
|
||||
} else {
|
||||
hinweisfenster.style.display = "none";
|
||||
function berechnePreise() {
|
||||
for (let i = 0; i < standardWerte.length; i++) {
|
||||
let preisID = 'gesamtbetrag' + (i + 1);
|
||||
let preisElement = document.getElementById(preisID);
|
||||
let preisEinzeln = (standardWerte[i] * preise[i]).toFixed(2);
|
||||
preisElement.innerText = "Betrag Gesamt (inkl. MwSt.): " + preisEinzeln + '€';
|
||||
}
|
||||
for (let i = 0; i < standardWerte.length; i++) {
|
||||
let preisID = 'gesamtbetrag' + (i + 4);
|
||||
let preisElement = document.getElementById(preisID);
|
||||
let preisEinzeln = (standardWerte[i] * preise[i]).toFixed(2);
|
||||
preisElement.innerText = "Betrag Gesamt (inkl. MwSt.): " + preisEinzeln + '€';
|
||||
}
|
||||
gesamtpreis = ((standardWerte[0] * preise[0]) + (standardWerte[1] * preise[1]) + (standardWerte[2] * preise[2])) + 2.90;
|
||||
let gesamtkostenText = document.getElementById("gesamtpreis");
|
||||
gesamtkostenText.innerText = gesamtpreis.toFixed(2) + "€";
|
||||
localStorage.setItem("gesamtpreis", gesamtpreis);
|
||||
}
|
||||
}
|
||||
|
||||
function zeigeHinweisfenster(text) {
|
||||
var hinweisfenster = document.getElementById("notification");
|
||||
hinweisfenster.innerText = text;
|
||||
if (text !== "") {
|
||||
hinweisfenster.style.display = "block";
|
||||
} else {
|
||||
hinweisfenster.style.display = "none";
|
||||
}
|
||||
}
|
||||
|
||||
function checkObFeldLeer(event) {
|
||||
let feld1 = document.getElementById("menue1").value;
|
||||
let feld2 = document.getElementById("menue2").value;
|
||||
let feld3 = document.getElementById("menue3").value;
|
||||
let feld4 = document.getElementById("menue4").value;
|
||||
let feld5 = document.getElementById("menue5").value;
|
||||
let feld6 = document.getElementById("menue6").value;
|
||||
|
||||
if ((feld1 === "") || (feld2 === "") || (feld3 === "") || (feld4 === "") || (feld5 === "") || (feld6 === "")) {
|
||||
event.preventDefault();
|
||||
zeigeHinweisfenster("Kein Feld darf leer sein!");
|
||||
|
||||
}
|
||||
else if ((/^[0-9]{1,}$/.test(feld1) === false) || (/^[0-9]{1,}$/.test(feld2) === false) || (/^[0-9]{1,}$/.test(feld3) === false)
|
||||
|| (/^[0-9]{1,}$/.test(feld4) === false) || (/^[0-9]{1,}$/.test(feld5) === false) || (/^[0-9]{1,}$/.test(feld6) === false)) {
|
||||
event.preventDefault();
|
||||
zeigeHinweisfenster("Es stehen keine (gültigen) Zahlen in den Feldern. [gültig = positive Zahlen 0-9]");
|
||||
}
|
||||
else {
|
||||
window.location.href = event.target.href;
|
||||
// zeigeHinweisfenster("Feld ist nicht leer");
|
||||
}
|
||||
}
|
||||
|
||||
var menue1 = document.getElementById('menue1');
|
||||
var menue2 = document.getElementById('menue2');
|
||||
var menue3 = document.getElementById('menue3');
|
||||
var gesamtbetrag1 = document.getElementById('gesamtbetrag1');
|
||||
var gesamtbetrag2 = document.getElementById('gesamtbetrag2');
|
||||
var gesamtbetrag3 = document.getElementById('gesamtbetrag3');
|
||||
var gesamtpreis = document.getElementById('gesamtpreis');
|
||||
|
||||
// Funktion zum Aktualisieren des Gesamtbetrags für Produkt 1
|
||||
function updateGesamtbetrag1() {
|
||||
var menueValue = menue1.value;
|
||||
var kosten = 0.95;
|
||||
var gesamtbetrag = kosten * menueValue;
|
||||
gesamtbetrag1.innerHTML = "Betrag Gesamt (inkl. MwSt.): " + gesamtbetrag.toFixed(2) + "€";
|
||||
updateGesamtpreis();
|
||||
}
|
||||
|
||||
// Funktion zum Aktualisieren des Gesamtbetrags für Produkt 2
|
||||
function updateGesamtbetrag2() {
|
||||
var menueValue = menue2.value;
|
||||
var kosten = 2;
|
||||
var gesamtbetrag = kosten * menueValue;
|
||||
gesamtbetrag2.innerHTML = "Betrag Gesamt (inkl. MwSt.): " + gesamtbetrag.toFixed(2) + "€";
|
||||
updateGesamtpreis();
|
||||
}
|
||||
|
||||
// Funktion zum Aktualisieren des Gesamtbetrags für Produkt 3
|
||||
function updateGesamtbetrag3() {
|
||||
var menueValue = menue3.value;
|
||||
var kosten = 1.1;
|
||||
var gesamtbetrag = kosten * menueValue;
|
||||
gesamtbetrag3.innerHTML = "Betrag Gesamt (inkl. MwSt.): " + gesamtbetrag.toFixed(2) + "€";
|
||||
updateGesamtpreis();
|
||||
}
|
||||
|
||||
// Funktion zum Aktualisieren des Gesamtpreises
|
||||
function updateGesamtpreis() {
|
||||
var menueValue1 = menue1.value;
|
||||
var menueValue2 = menue2.value;
|
||||
var menueValue3 = menue3.value;
|
||||
var kosten1 = 0.95;
|
||||
var kosten2 = 2;
|
||||
var kosten3 = 1.1;
|
||||
var gesamtpreisValue = (kosten1 * menueValue1) + (kosten2 * menueValue2) + (kosten3 * menueValue3) + 2.9;
|
||||
gesamtpreis.innerHTML = gesamtpreisValue.toFixed(2) + "€";
|
||||
}
|
||||
|
||||
// Event-Listener für Änderungen der Anzahl
|
||||
menue1.addEventListener('input', updateGesamtbetrag1);
|
||||
menue2.addEventListener('input', updateGesamtbetrag2);
|
||||
menue3.addEventListener('input', updateGesamtbetrag3);
|
||||
|
||||
// Initialisierung des Gesamtbetrags und Gesamtpreises
|
||||
updateGesamtbetrag1();
|
||||
updateGesamtbetrag2();
|
||||
updateGesamtbetrag3();
|
||||
});
|
|
@ -6,8 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Kontakt</title>
|
||||
<style>
|
||||
@import 'css/mobile.css' (max-width: 480px);
|
||||
@import 'css/desktop.css' (min-width: 481px);
|
||||
@import 'css/mobile.css' (max-width: 800px);
|
||||
@import 'css/desktop.css' (min-width: 801px);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 409 B After Width: | Height: | Size: 409 B |
Before Width: | Height: | Size: 436 B After Width: | Height: | Size: 436 B |
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 460 B |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
|
@ -6,8 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Produkte</title>
|
||||
<style>
|
||||
@import 'css/mobile.css' (max-width: 480px);
|
||||
@import 'css/desktop.css' (min-width: 481px);
|
||||
@import 'css/mobile.css' (max-width: 800px);
|
||||
@import 'css/desktop.css' (min-width: 801px);
|
||||
</style>
|
||||
<script src="javascript/warenkorb.js"></script>
|
||||
</head>
|
||||
|
@ -71,7 +71,7 @@
|
|||
<div class="produkte">
|
||||
<img src="pictures/karotten.png" width="300" height="300" alt="Karotten" data-id="karotte">
|
||||
<div class ="produktbottom">
|
||||
<img src ="pictures/FoodAmpel_gelb.png" width = "50" height="50" alt="FoodAmpel gelb">
|
||||
<img src ="pictures/food_ampel_gelb.png" width = "50" height="50" alt="FoodAmpel gelb">
|
||||
<select name="quantity">
|
||||
<option value="1">1 Stück</option>
|
||||
<option value="2">2 Stück</option>
|
||||
|
@ -85,7 +85,7 @@
|
|||
<div class="produkte">
|
||||
<img src="pictures/sellerie.png" width = "300" height="300" alt="Sellerie" data-id="sellerie">
|
||||
<div class ="produktbottom">
|
||||
<img src ="pictures/FoodAmpel_gelb.png" width = "50" height="50" alt="FoodAmpel gelb">
|
||||
<img src ="pictures/food_ampel_gelb.png" width = "50" height="50" alt="FoodAmpel gelb">
|
||||
<select name="quantity" >
|
||||
<option value="1">1 Stück</option>
|
||||
<option value="2">2 Stück</option>
|
||||
|
@ -98,7 +98,7 @@
|
|||
<div class="produkte">
|
||||
<img src="pictures/birnen.png" width = "300" height= "300" alt="Birnen" data-id="birnen">
|
||||
<div class ="produktbottom">
|
||||
<img src ="pictures/FoodAmpel_rot.png" width = "50" height="50" alt="FoodAmpel gelb">
|
||||
<img src ="pictures/food_ampel_rot.png" width = "50" height="50" alt="FoodAmpel rot">
|
||||
<select name="quantity">
|
||||
<option value="1">1 Stück</option>
|
||||
<option value="2">2 Stück</option>
|
||||
|
@ -111,7 +111,7 @@
|
|||
<div class="produkte">
|
||||
<img src="pictures/kiwi.png" width = "300" height="300" alt="Kiwi" data-id="kiwi">
|
||||
<div class ="produktbottom">
|
||||
<img src ="pictures/FoodAmpel_gruen.png" width = "50" height="50" alt="FoodAmpel gelb">
|
||||
<img src ="pictures/food_ampel_gruen.png" width = "50" height="50" alt="FoodAmpel gruen">
|
||||
<select name="quantity" >
|
||||
<option value="1">1 Stück</option>
|
||||
<option value="2">2 Stück</option>
|
||||
|
@ -124,7 +124,7 @@
|
|||
<div class="produkte">
|
||||
<img src="pictures/orangen.png" width = "300" height="300" alt="Orangen" data-id="orangen">
|
||||
<div class ="produktbottom">
|
||||
<img src ="pictures/FoodAmpel_gelb.png" width = "50" height="50" alt="FoodAmpel gelb">
|
||||
<img src ="pictures/food_ampel_gelb.png" width = "50" height="50" alt="FoodAmpel gelb">
|
||||
<select name="quantity">
|
||||
<option value="1">1 Stück</option>
|
||||
<option value="2">2 Stück</option>
|
||||
|
@ -137,7 +137,7 @@
|
|||
<div class="produkte">
|
||||
<img src="pictures/aepfel.png" width = "300" height="300" alt="Äpfel" data-id="äpfel">
|
||||
<div class ="produktbottom">
|
||||
<img src ="pictures/FoodAmpel_gelb.png" width ="50" height="50" alt="FoodAmpel gelb">
|
||||
<img src ="pictures/food_ampel_gelb.png" width ="50" height="50" alt="FoodAmpel gelb">
|
||||
<select name="quantity">
|
||||
<option value="1">1 Stück</option>
|
||||
<option value="2">2 Stück</option>
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Ueber uns</title>
|
||||
<style>
|
||||
@import 'css/mobile.css' (max-width: 480px);
|
||||
@import 'css/desktop.css' (min-width: 481px);
|
||||
@import 'css/mobile.css' (max-width: 800px);
|
||||
@import 'css/desktop.css' (min-width: 801px);
|
||||
</style>
|
||||
</head>
|
||||
|
||||
|
|
|
@ -6,8 +6,8 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Warenkorb</title>
|
||||
<style>
|
||||
@import 'css/mobile.css'(max-width: 480px);
|
||||
@import 'css/desktop.css'(min-width: 481px);
|
||||
@import 'css/mobile.css'(max-width: 800px);
|
||||
@import 'css/desktop.css'(min-width: 801px);
|
||||
</style>
|
||||
<script src="javascript/warenkorb.js"></script>
|
||||
</head>
|
||||
|
@ -67,63 +67,141 @@
|
|||
|
||||
<div class="content">
|
||||
<h1>Warenkorb</h1>
|
||||
<div class="produkte_warenkorb">
|
||||
<img src="pictures/karotte_ohne_preis.webp" alt="karotten">
|
||||
<div class="produkte_details">
|
||||
<p><strong>Karotten 1kg</br>Kosten: 0,95€</strong></p>
|
||||
</br>
|
||||
<p>Auf Lager: 250</p>
|
||||
|
||||
<div id="notification"></div>
|
||||
<div class="desktop_ansicht">
|
||||
<div class="produkte_warenkorb">
|
||||
<img src="pictures/karotte_ohne_preis.webp" alt="karotten">
|
||||
<div class="produkte_details">
|
||||
<p><strong>Karotten 1kg</br>Kosten: 0,95€</strong></p>
|
||||
</br>
|
||||
<p>Auf Lager: 250</p>
|
||||
</div>
|
||||
<div class="button_mit_menue">
|
||||
<p><a class="button_entfernen" href="#" id="button1">Entfernen</a></p>
|
||||
<input type="text" id="menue1" value="10">
|
||||
|
||||
</div>
|
||||
<p class="gesamtbetrag1" id="gesamtbetrag1"></p>
|
||||
</div>
|
||||
<div class="button_mit_menue">
|
||||
<p><a class="button_entfernen" href="#" id="button1" onclick="entferneAusWarenkorb(1)">Entfernen</a></p>
|
||||
<input type="text" id="menue1" value="10">
|
||||
<div id="notification"></div>
|
||||
|
||||
<div class="produkte_warenkorb">
|
||||
<img src="pictures/aepfel_ohne_preis.png.avif" alt="aepfel">
|
||||
<div class="produkte_details">
|
||||
<p><strong>Äpfel 1kg</br>Kosten: 2€</strong></p>
|
||||
</br>
|
||||
<p>Auf Lager: 500</p>
|
||||
</div>
|
||||
<div class="button_mit_menue">
|
||||
<p><a class="button_entfernen" href="#" id="button2">Entfernen</a></p>
|
||||
<input type="text" id="menue2" value="10">
|
||||
|
||||
</div>
|
||||
<p class="gesamtbetrag2" id="gesamtbetrag2"></p>
|
||||
</div>
|
||||
|
||||
<div class="produkte_warenkorb">
|
||||
<img src="pictures/sellerie_ohne_preis.webp" alt="sellerie">
|
||||
<div class="produkte_details">
|
||||
<p><strong>Sellerie 1 Stück</br>Kosten: 1,10€</strong></p>
|
||||
</br>
|
||||
<p>Auf Lager: 1000</p>
|
||||
</div>
|
||||
<div class="button_mit_menue">
|
||||
<p><a class="button_entfernen" href="#" id="button3">Entfernen</a></p>
|
||||
<input type="text" id="menue3" value="10">
|
||||
|
||||
</div>
|
||||
<p class="gesamtbetrag3" id="gesamtbetrag3"></p>
|
||||
</div>
|
||||
<div class="äußererContainer">
|
||||
<div class="kostenContainer">
|
||||
<p class="lieferkosten_text">Lieferkosten:</p>
|
||||
<p class="lieferkosten_preis">2,90€</p>
|
||||
<p class="gesamtkosten_text">Gesamtkosten (inkl. MwSt): </p>
|
||||
<p class="gesamtpreis" id="gesamtpreis"></p>
|
||||
</div>
|
||||
<div>
|
||||
<a class="button_bestellung_abschließen" id="bestellbutton_desktop"
|
||||
href="bestellformular.html">Kostenpflichtig
|
||||
bestellen</a>
|
||||
</div>
|
||||
</div>
|
||||
<p class="gesamtbetrag1" id="gesamtbetrag1"></p>
|
||||
</div>
|
||||
|
||||
<div class="produkte_warenkorb">
|
||||
<img src="pictures/aepfel_ohne_preis.png.avif" alt="aepfel">
|
||||
<div class="produkte_details">
|
||||
<p><strong>Äpfel 1kg</br>Kosten: 2€</strong></p>
|
||||
</br>
|
||||
<p>Auf Lager: 500</p>
|
||||
<div class="mobile_ansicht">
|
||||
<div class="produkte_warenkorb">
|
||||
<div class="bild_mobil">
|
||||
<img src="pictures/karotte_ohne_preis.webp" width="100" height="100" alt="karotten">
|
||||
</div>
|
||||
<div class="produkte_details">
|
||||
<p><strong>Karotten 1kg</br>Kosten: 0,95€</strong></p>
|
||||
<span class="eingabefeld_entfernen">
|
||||
<input type="text" id="menue4" value="10">
|
||||
</span>
|
||||
|
||||
</br>
|
||||
<p>Auf Lager: 250</p>
|
||||
</div>
|
||||
<div class="button_mit_menue">
|
||||
<p><a class="button_entfernen" href="#" id="button4">Entfernen</a></p>
|
||||
</div>
|
||||
<p class="gesamtbetrag4" id="gesamtbetrag4"></p>
|
||||
</div>
|
||||
<div class="button_mit_menue">
|
||||
<p><a class="button_entfernen" href="#" id="button2" onclick="entferneAusWarenkorb(2)">Entfernen</a></p>
|
||||
<input type="text" id="menue2" value="10">
|
||||
<div id="notification"></div>
|
||||
</div>
|
||||
<p class="gesamtbetrag2" id="gesamtbetrag2"></p>
|
||||
</div>
|
||||
|
||||
<div class="produkte_warenkorb">
|
||||
<img src="pictures/sellerie_ohne_preis.webp" alt="sellerie">
|
||||
<div class="produkte_details">
|
||||
<p><strong>Sellerie 1 Stück</br>Kosten: 1,10€</strong></p>
|
||||
</br>
|
||||
<p>Auf Lager: 1000</p>
|
||||
<div class="produkte_warenkorb">
|
||||
<div class="bild_mobil">
|
||||
<img src="pictures/aepfel_ohne_preis.png.avif" width="100" height="100" alt="aepfel">
|
||||
</div>
|
||||
<div class="produkte_details">
|
||||
<p><strong>Äpfel 1kg</br>Kosten: 2€</strong></p>
|
||||
<span class="eingabefeld_entfernen"><input type="text"
|
||||
id="menue5" value="10"></span>
|
||||
|
||||
</br>
|
||||
<p>Auf Lager: 500</p>
|
||||
</div>
|
||||
<div class="button_mit_menue">
|
||||
<p><a class="button_entfernen" href="#" id="button5">Entfernen</a></p>
|
||||
</div>
|
||||
<p class="gesamtbetrag5" id="gesamtbetrag5"></p>
|
||||
</div>
|
||||
<div class="button_mit_menue">
|
||||
<p><a class="button_entfernen" href="#" id="button3" onclick="entferneAusWarenkorb(3)">Entfernen</a></p>
|
||||
<input type="text" id="menue3" value="10">
|
||||
<div id="notification"></div>
|
||||
|
||||
<div class="produkte_warenkorb">
|
||||
<div class="bild_mobil">
|
||||
<img src="pictures/sellerie_ohne_preis.webp" width="100" height="100" alt="sellerie">
|
||||
</div>
|
||||
<div class="produkte_details">
|
||||
<p><strong>Sellerie 1 Stück</br>Kosten: 1,10€</strong></p>
|
||||
<span class="eingabefeld_entfernen"> <input type="text" id="menue6" value="10"></span>
|
||||
|
||||
</br>
|
||||
<p>Auf Lager: 1000</p>
|
||||
</div>
|
||||
<div class="button_mit_menue">
|
||||
<p><a class="button_entfernen" href="#" id="button6">Entfernen</a></p>
|
||||
|
||||
|
||||
</div>
|
||||
<p class="gesamtbetrag6" id="gesamtbetrag6"></p>
|
||||
</div>
|
||||
<p class="gesamtbetrag3" id="gesamtbetrag3"></p>
|
||||
</div>
|
||||
<div class="äußererContainer">
|
||||
<div class="kostenContainer">
|
||||
<p class="lieferkosten_text">Lieferkosten:</p>
|
||||
<p class="lieferkosten_preis">2,90€</p>
|
||||
<p class="gesamtkosten_text">Gesamtkosten (inkl. MwSt): </p>
|
||||
<p class="gesamtpreis" id="gesamtpreis"></p>
|
||||
</div>
|
||||
<div>
|
||||
<a class="button_bestellung_abschließen" href="bestellformular.html">Kostenpflichtig bestellen</a>
|
||||
<div class="äußererContainer">
|
||||
<div class="kostenContainer">
|
||||
<p class="lieferkosten_text">Lieferkosten:</p>
|
||||
<p class="lieferkosten_preis">2,90€</p>
|
||||
<p class="gesamtkosten_text">Gesamtkosten (inkl. MwSt): </p>
|
||||
<p class="gesamtpreis" id="gesamtpreis"></p>
|
||||
</div>
|
||||
<div>
|
||||
<a class="button_bestellung_abschließen" id="bestellbutton_mobil"
|
||||
href="bestellformular.html">Kostenpflichtig
|
||||
bestellen</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<footer>
|
||||
<nav class="navbar-desktop" style="--items: 2;">
|
||||
<a href="impressum.html">Impressum</a>
|
||||
|
|