i am trying to add an add to cart function on a customized product page. I cant get anyinfo to pass into the cart. Finally I tried a very simple code to test.
$w(“#addToCart”).onClick( () => {
$w(“#shoppingCartIcon2”).addToCart(“5baa1a09-1b5d-46a5-b16b-12d3f589c969”)
.then( () => {
} )
.catch( (error) => {
console.log(error);
} );
} );
when I preview this code, it will open the add to cart window, but doesnt add anything to the cart.
I dont know what I am doing wrong.