shoppingCart
- (frontend) shopping cart inspired by Web Dev Simplified Tutorial
shoppingCart.mp4
features
- add to cart
- button
-
cart update
- remove from cart
- on remove button click
- update price on in-/decreasing quantity
- update row price
- update total price
- This item is already in your cart alert
- purchase button
- alert: Thank you for your purchase
- remove all cart items
- update total price of cart
Todo
potential improvements
- more usable input field in cart (especially for mobile) -> up/down buttons larger
- don't allow negative values in input field of cart (e.g. simply block steps below 1 &/OR alert when attempting to step below 1 to ask if item should be removed from cart (otherwise stays at 1))
- improve styling
- add backend (actually enable "real" purchases)
- use browser saving capabilities to save cart
- remember cart content when same user/browser returns back to page