Trying to have the option when clicking button “Add to quote” will add the result from the estimate into a new object in the cart. Then have the current cart show at the bottom. Here is the pen you can look at.
I’m a noob and there is some code i’m not using in there. I’m not sure if we can hire people here… I’m open to that if so.
other issues
I can only get Value to show instead of name above the price
I tried document.getElementById(“choice”).name and .getAttribute(“name”)
OK. I have used your great advice and worked on my own.
When adding item to cart I want the bottom to display total price and total square feet and total count. But it does 100+100 = 100100 instead of 200 for example
Also, what about my results being limited to 2 decimal places?
When you get the contents of the html using getElementBy, you’re extracting a string. If you use the “+” operator on 2 strings, then you’re just appending it together.
You need to convert the string to an int or float value before you add them, so you’ll get the numeric total (instead of a string concatenation)