added product & shop

This commit is contained in:
StockiP
2022-05-23 09:26:57 +02:00
parent 8b0044470e
commit dd12b3f6ee
17 changed files with 473 additions and 19 deletions

35
components/cart.html Normal file
View File

@@ -0,0 +1,35 @@
<div class="container maincontent cartpage">
<div class="cart-container">
<h1 class="display-2">Einkaufswagen</h1>
<table class="table table-striped table-hover table-bordered">
<thead>
<tr>
<th><strong>Product ID</strong></th>
<th class="text-center"><strong>Löschen</strong></th>
<th><strong>Produktname</strong></th>
<th class="text-end"><strong>Preis</strong></th>
<th class="text-end"><strong>Anzahl</strong></th>
<th class="text-end"><strong >Gesamtpreis pro Produkt</strong></th>
</tr>
</thead>
<tbody id="carttable">
</tbody>
</table>
<hr>
<table class="table table-striped" id="carttotals">
<tr>
<td><strong>Gesamtanzahl</strong></td>
<td class="text-end"><strong>Gesamtpreis</strong></td>
</tr>
<tr>
<td>x <span id="itemsquantity">0</span></td>
<td class="text-end"><span id="total">0</span></td>
</tr>
</table>
<div class="cart-buttons">
<button type="button" class="btn btn-danger" id="emptycart">Empty Cart</button>
<button type="button" class="btn btn-success float-end" id="checkout">Checkout</button>
</div>
</div>
</div>
<script src="../js/cart.js"></script>

View File

@@ -18,7 +18,7 @@
<a class="nav-link" id="aboutLink">About</a>
</li>
<li class="nav-item">
<a class="nav-link" id="shopLink">Shop</a>
<a class="nav-link" type="button" id="shopLink">Shop</a>
</li>
<li class="nav-item">
<a class="nav-link" id="contactLink">Contact</a>
@@ -49,9 +49,9 @@
<a class="nav-icon d-none d-lg-inline" href="#" data-bs-toggle="modal" data-bs-target="#marmeladenladen_search">
<i class="fa fa-fw fa-search text-dark mr-2"></i>
</a>
<a class="nav-icon position-relative text-decoration-none" href="#">
<a class="nav-icon position-relative text-decoration-none" type="button" id="cartLink">
<i class="fa fa-fw fa-cart-arrow-down text-dark mr-1"></i>
<span class="position-absolute top-0 left-100 translate-middle badge rounded-pill bg-light text-dark">7</span>
<span class="position-absolute top-0 left-100 translate-middle badge rounded-pill bg-light text-dark" id="cartCount"></span>
</a>
<a class="nav-icon position-relative text-decoration-none" href="#">
<i class="fa fa-fw fa-user text-dark mr-3"></i>

9
components/shop.html Normal file
View File

@@ -0,0 +1,9 @@
<div class="container wrapper maincontent shoppingpage">
<div class="alert alert-success fade show" role="alert" id="productAddedAlert">
</div>
<div class="container" id="productOverview">
<div class="row g-1" id="productOverviewDiv">
</div>
</div>
</div>
<script src="../js/getProducts.js"></script>