From e51a7d0702172aa0c92567f2ac02ff4b8078e4a3 Mon Sep 17 00:00:00 2001 From: Janis M Date: Wed, 30 Mar 2022 11:06:31 +0200 Subject: [PATCH 1/2] fixed price .toFixed(2) --- views/account.ejs | 2 +- views/order.ejs | 4 ++-- views/product.ejs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/views/account.ejs b/views/account.ejs index 040d9df..cfd9abb 100644 --- a/views/account.ejs +++ b/views/account.ejs @@ -38,7 +38,7 @@ <%= orders[i].name %> In Progress <%= orders[i].quantity %> - <%= orders[i].price %> + <%= orders[i].price %> € <%= orders[i].price * orders[i].quantity%> € <% } %> diff --git a/views/order.ejs b/views/order.ejs index 1716f9c..ffc9b17 100644 --- a/views/order.ejs +++ b/views/order.ejs @@ -12,10 +12,10 @@

Produktname: <%= product.name %>

-

Stückpreis: <%= product.price %> €

+

Stückpreis: <%= product.price.toFixed(2) %> €

Anzahl: <%= quantity %>


-

Gesamtpreis: <%= quantity * product.price %> €

+

Gesamtpreis: <%= (quantity * product.price).toFixed(2) %> €

diff --git a/views/product.ejs b/views/product.ejs index f627c46..8d6e6bb 100644 --- a/views/product.ejs +++ b/views/product.ejs @@ -21,7 +21,7 @@

Verkäufer: <%= product.sellerName%>


-

Preis: <%= product.price %> € / Stück +

Preis: <%= product.price.toFixed(2) %> € / Stück

Kategorie: <%= category.name %>

<% if(product.quantity > 0){%> From f00b090415d32fb951714345d23b3fb7191adcdd Mon Sep 17 00:00:00 2001 From: Janis M Date: Wed, 30 Mar 2022 11:26:28 +0200 Subject: [PATCH 2/2] a --- views/account.ejs | 3 +-- views/index.ejs | 20 +++++++++----------- 2 files changed, 10 insertions(+), 13 deletions(-) diff --git a/views/account.ejs b/views/account.ejs index cfd9abb..a0212b3 100644 --- a/views/account.ejs +++ b/views/account.ejs @@ -17,7 +17,7 @@

Adresse:

- +

Ihre Bestellungen

@@ -46,7 +46,6 @@
- \ No newline at end of file diff --git a/views/index.ejs b/views/index.ejs index db077e7..54c5912 100644 --- a/views/index.ejs +++ b/views/index.ejs @@ -7,14 +7,14 @@ <%- include('partials/header'); %>