Shopping cart
Visitors to the MERN Marketplace can add products they wish to buy to a shopping cart by clicking the add to cart button on each product. A cart icon in the menu will indicate the number of products already added to their cart as the user continues to browse through the marketplace. They can also update the cart contents and begin the checkout by opening the cart view. But to complete checkout and place an order, users will be required to sign in.
The shopping cart is mainly a frontend feature, so the cart details will be stored locally on the client side until the user places the order at checkout. To implement the shopping cart features, we will set up helper methods in client/cart/cart-helper.js to help manipulate the cart ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access