This project is a simple shopping cart page implemented using React and Redux. It allows users to:
- Increase the quantity of each product up to a maximum of 10.
- Calculate the overall price for all products in the cart.
- Delete products from the cart.
- Recalculate the total price based on the available items in the cart.
-
Clone the repository:
git clone https://github.com/SelvakumarBoominathan/Redux-checkout.git
Open your web browser and navigate to http://localhost:5174
to view the cart page. You can increase the quantity of each product, delete products, and see the total price updated accordingly.
The main component that renders the cart page. It combines Checkout
and Total_Price
components.
A component that displays the list of products in the cart, including:
- Product name
- Product model
- Product price
- Product image
- Product rating (Star)
- Input to change quantity (up to 10)
- Button to delete the product
- Product total price per quantity
A component that displays the total price of all products in the cart.
updateTotalCost(newTotal)
: Sets the total cost of all products.deleteProduct(productID
: Removes the deleted product from the cart.
The reducers handle updating the state based on the dispatched actions.
The Redux store is configured in store.js
using redux
.