Click here to Skip to main content
15,868,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to create the page using json and do the functions add cart remove cart

What I have tried:

For each category, there will be list of the products displayed in box layout as shown below.  Each box will contain Name and price of the product coming from JSON. This must be dynamic in nature. Modifying the JSON data should modify the contents of the box.
Inside each box there will be Add to Cart and Remove from cart button.
On click of Add to cart, add product to the cart array and print following on console
Product Added to the cart.
List of product present in cart array.
On click of Remove from Cart, remove product from the cart array and print following on console
Product removed from the cart.
List of product present in cart array.
Deploy the code to the portals like github/Heroku/netlify and provide the link. Also, send the code files
Posted
Updated 23-Sep-22 18:42pm

1 solution

While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for us to do it all for you.

So we need you to do the work, and we will help you when you get stuck. That doesn't mean we will give you a step by step solution you can hand in!
Start by explaining where you are at the moment, and what the next step in the process is. Then tell us what you have tried to get that next step working, and what happened when you did.

Just copy'n'pastign your assignment with no sign of any effort at all isn't going to get you anywhere.

If you are having problems getting started at all, then this may help: How to Write Code to Solve a Problem, A Beginner's Guide[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900