**Udated!** Adding / removing items from local storage shopping cart

Hello all, I have been tweaking on my landing page and I’ve run into a few issues I can’t figure out.

First, I don’t know how to link a 2nd html file to my codepen so you can see the functionality of the added objects to the cart.

I am having problems implementing the removeItem() function using onclick = removeItem() for my x icon, along with deleting objects from the local storage this way I cannot seem to figure out how to use the arrow icons to increment the items in the cart. Any help or direction would be much appreciated.

Hey there,

you can use codpen projects to do this, instead of a pen:

I created an example project:

Would be awesome to see this in action with some data in it.
Currently I can’t see any data in it, although there are some products in the JS code.

<div class='product';><ion-icon name="close-circle" onclick="removeItem()");></ion-icon>

Don’t know if this works, there are some ; and a ) that could break the code.

1 Like

@miku86 Thanks! I didn’t know about that feature. Here is the page all together functioning as it should (minus the buttons in the cart I was asking about)