Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created September 4, 2019 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/1cbc8cf45998532a185ce856f49338a7 to your computer and use it in GitHub Desktop.
Save parzibyte/1cbc8cf45998532a185ce856f49338a7 to your computer and use it in GitHub Desktop.
@GetMapping(value = "/")
public String interfazVender(Model model, HttpServletRequest request) {
model.addAttribute("producto", new Producto());
float total = 0;
ArrayList<ProductoParaVender> carrito = this.obtenerCarrito(request);
for (ProductoParaVender p: carrito) total += p.getTotal();
model.addAttribute("total", total);
return "vender/vender";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment