COMP3005A-Project / bookstore

Main project for course COMP3005. Full web application representing a virtual bookstore.
1 stars 0 forks source link

Add books in cart functionality #29

Closed BoxThatBeat closed 2 years ago

BoxThatBeat commented 2 years ago

Users select the books they want, they press add to cart and that triggers a form that gives the list of ISBNs to a post controller method which: 1. saves the ids to the session but as a set of ids (only if not in list) 2. redirects back to the same page. Then using Thymeleaf you can get the size of the list from the session and display a number beside the cart in brackets indicating the number of books in the cart

Requirements: Add a session object for holding books in cart Add a form and JS to front end of books page to add books to cart (includes adding button)