diff --git a/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java b/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java index 9bb20fd..94e79c6 100644 --- a/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java +++ b/prototype/src/main/java/org/hso/ecommerce/app/RequestController.java @@ -29,16 +29,9 @@ public class RequestController { } @PostMapping("/login") - public String loginPost(HttpServletResponse response, @RequestParam(value = "goto", required = false) String gto) { + public String loginPost(HttpServletResponse response) { response.addCookie(new Cookie("login", "true")); - - System.out.println(gto); - - if (gto != null && gto.startsWith("/")) { - return "redirect:" + gto; - } else { - return "redirect:/"; - } + return "redirect:/"; } @PostMapping("/logout") @@ -82,12 +75,8 @@ public class RequestController { } @PostMapping("/shop/articles/{id}") - public String shopArticlesByIdBuy(@RequestAttribute("customer") Boolean isCustomer, @PathVariable("id") Integer id) { - if (isCustomer) { - return "redirect:/shop/checkout"; - } else { - return "redirect:/login?goto=%2Fshop%2Farticles%2F"+id; - } + public String shopArticlesByIdBuy(HttpServletResponse response) { + return "redirect:/shop/checkout"; } @GetMapping("/user/") diff --git a/prototype/src/main/resources/templates/shop/checkout.html b/prototype/src/main/resources/templates/shop/checkout.html index 6327d18..d35a220 100644 --- a/prototype/src/main/resources/templates/shop/checkout.html +++ b/prototype/src/main/resources/templates/shop/checkout.html @@ -30,8 +30,8 @@ - - Kamera + + Kamera 100,50 € @@ -64,8 +64,8 @@ - - USB-Magic Light + + USB-Magic Light 11,90 € @@ -98,8 +98,8 @@ - - Ersatzfernbedinung + + Ersatzfernbedinung 7,95 € +
+
+ + +

Bestellübersicht

@@ -145,6 +149,10 @@ Musterstraße 42 Artikel (Netto) 200,29 € + + Bonuspunkte + -5,00 € + Umsatzsteuer (19%) 35,00 € @@ -168,4 +176,5 @@ Musterstraße 42 +