invoice.jsp

 <%@ page language="java" contentType="text/html; charset=ISO-8859-1"

pageEncoding="ISO-8859-1"%>


<!DOCTYPE html>


<html lang="en">


<head>


<meta charset="ISO-8859-1">


<meta name="viewport" content="width=device-width, initial-scale=1.0">


<title>Invoice - Online Grocery Store</title>


<link rel="stylesheet" href="styles.css">


<script src="js/script.js" defer></script>


</head>


<body>


<header>


<div class="header-container">


<h1>Online Grocery Store</h1>


<nav>


<a href="home.jsp">Home</a>


<a href="products.jsp">Products</a>


<a href="cart.jsp">Cart</a>


<a href="profile.jsp">Profile</a>


<a href="login.jsp">Login</a>


<a href="register.jsp">Register</a>


</nav>


</div>


</header>




<main>


<section class="invoice-section">


<h2>Invoice</h2>


<p>Thank you for your purchase! Below are the details of your order:</p>




<table class="invoice-table">


<thead>


<tr>


<th>Item</th>


<th>Quantity</th>


<th>Price</th>


<th>Total</th>


</tr>


</thead>


<tbody>


<c:forEach var="item" items="${cart.items}">


<tr>


<td>${item.name}</td>


<td>${item.quantity}</td>


<td>$${item.price}</td>


<td>$${item.quantity * item.price}</td>


</tr>


</c:forEach>


</tbody>


<tfoot>


<tr>


<td colspan="3" class="total-label">Subtotal:</td>


<td>$${cart.subtotal}</td>


</tr>


<tr>


<td colspan="3" class="total-label">Tax (10%):</td>


<td>$${cart.subtotal * 0.1}</td>


</tr>


<tr>


<td colspan="3" class="total-label">Total:</td>


<td>$${cart.subtotal + (cart.subtotal * 0.1)}</td>


</tr>


</tfoot>


</table>




<div class="invoice-actions">


<button onclick="window.print()" class="btn-primary">Print Invoice</button>

<br><br>

<a href="home.jsp" class="btn-secondary">Continue Shopping</a>


</div>


</section>


</main>




<footer>


<p>&copy; 2024 Online Grocery Store</p>


</footer>


</body>


</html>




Comments

Popular posts from this blog

fruit.jsp