mirror of
https://github.com/DerTyp7/shop-ejs-expressjs.git
synced 2025-10-29 20:42:10 +01:00
order
This commit is contained in:
28
views/order.ejs
Normal file
28
views/order.ejs
Normal file
@@ -0,0 +1,28 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<%- include('partials/head'); %>
|
||||
<link rel="stylesheet" href="/order.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Ihre Bestellung</h1>
|
||||
<p id="error-text"><%- error %></p>
|
||||
|
||||
<div id="order-info">
|
||||
<p><b>Produktname:</b> <%= product.name %></p>
|
||||
<p><b>Stückpreis:</b> <%= product.price %> €</p>
|
||||
<p><b>Anzahl: </b><%= quantity %></p>
|
||||
<hr>
|
||||
<p><b>Gesamtpreis:</b> <%= quantity * product.price %> €</p>
|
||||
</div>
|
||||
|
||||
<!--submit button-->
|
||||
<form action="/order" method="POST">
|
||||
<input type="text" name="productId" value="<%= product.id %>">
|
||||
<input type="text" name="quantity" value="<%= quantity %>">
|
||||
<!-- Price is calculated on backend ;) -->
|
||||
|
||||
<input type="submit" value="Bestellen">
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user