Add to Cart Button Not Working

Can you explain a little bit better what does not work?

The function code looks valid.

The addToCart function returns a promise. Can you change the code so that we check the response of the promise?

e.g.

   $w('#shoppingCartIcon1').addToCart(currentProduct._id, 1, {
     "choices": {
       "Background Color": $w('#colorText').text,
       "Text Color": $w('#textColorName').text
     })
   .then(() => {
     console.log("product added to cart");
   })
   .catch((e) => {
     console.error("failed to add product to cart", e.message);
   });