Skip to content

Conversation

@shinyay
Copy link
Owner

@shinyay shinyay commented Jun 16, 2024

Related to #82

Introduces shopping cart functionality to the Spring Boot application, allowing users to add products, view their cart, and clear it.

  • Models Added: Creates Product and CartItem classes to represent products and items in the shopping cart, including necessary fields and getters/setters.
  • Service Layer: Implements ShoppingCartService with methods to add items to the cart, calculate the total price, and clear the cart, utilizing a list to manage cart items.
  • Controller: Adds ShoppingCartController with endpoints for adding items to the cart (/add), viewing cart items (/items), and clearing the cart (/clear), facilitating interaction with the shopping cart service.
  • View and Styling: Introduces a Thymeleaf template cart.html for the shopping cart view, displaying cart items, total price, and providing options to add more items or clear the cart. Accompanies this with a CSS file cart.css for basic styling of the cart page.

For more details, open the Copilot Workspace session.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants